How can I hide content in an HTML file from search engines?

Say that I am writing an article or document on a specific topic, but the content is intended for readers with some prior knowledge of the topic. To help people who do not have the “required” help information, I would like to add a note at the top of the page with an explanation and, possibly, a link to some help materials.

Here is an example:

Using the best product in the world to create world peace

Note. This article assumes that you are already familiar with the "Best Product in the World." To learn more about the "Best Product in the World", visit the official website.

  The best product in the world ...

Now I don’t want the note to appear in Google search results , but only the title and content following the note. Is there any way to achieve this?

In addition, is it possible to do this without directly managing the entire HTML file and / or HTTP response, that is, on a third-party blog such as Wordpress.com ?

Update

Unfortunately, both the JavaScript solution and the HTML meta tag approach do not work on public Wordpress.com blogs because they do not allow JavaScript to be used in posts and they do not provide access directly to the HTML meta tags.

+3
source share
8 answers

You can dynamically create this piece of content using Javascript.

For instance:

<html>
<body>
  <div id="dynContent">
  </div>
   Rest of the content here.
</body>
<script language='javascript' type='text/javascript'>
  var dyn = document.getElementById('dynContent');
  dyn.innerHTML = "Put the dynamic content here";
</script>
</html>

, , . "".

+4

Javascript. javascript, . , , . . , . .

+2

iframe, html , . , google .., .

:

<meta name="robots" content="noindex, nofollow">
+2

, , . , , , , "n" .

+1

. , JavaScript ?

0

... , <div> : ; z-: 99 ( 1); top: 0px; - , ... , , .

: , , , - , - ..: \. javascript

0

. , , , , , -.

0

I am familiar with how WordPress.com works, but if you can add things like Digg, Delicious badges on your blog as an added part of the third part, then you may have the opportunity to do the same trick with these badges, they add dynamic content to your page, and you can understand how they do it, and do the same with your custom content

0
source

Source: https://habr.com/ru/post/1697588/


All Articles