I would like to tell Google not to index certain parts of the page. In Yandex (russian SE) there's a very useful tag called <noindex>
. How can it be done with Google?
相关问题
- should rel-canonical also include protocol (http/h
- Fetch as Google Webmaster tools
- Will dynamically generated content via Javascript
- When will my site's CSS affect my search engin
- Microdata/Schema.org/SEO: How to properly set a Co
相关文章
- Dynamic robots.txt
- When does Googlebot execute javascript?
- Pretty Paths in Rails
- xpath in =importXML() for extracting meta descript
- Does the user agent string have to be exactly as i
- Short URL or long URL for SEO
- SEO-friendly URLs in CodeIgniter without the use o
- Is using a select list for navigation SEO Friendly
Create a robots.txt file at your root level and insert something like the following:
Block Google:
Block all bots:
A handy robots.txt generator:
http://www.mcanerin.com/EN/search-engine/robots-txt.asp
No, Google does not support the
<noindex>
tag. Virtually no one does.You can prevent Google from seeing portions of the page by putting those portions in iframes that are blocked by robots.txt.
robots.txt
index.html
/iframes/hidden.html
Instead of using using iframes, you could load the contents of the hidden file using AJAX. Here is an example that uses jquery ajax to do so:
According to Wikipedia1, there are some rules some spiders follow:
Unfortunately, they could not agree on a single standard it seems – and to my knowledge, there's nothing to keep all spiders off...
The
googleoff:
comment seems to support different options, though I'm not sure where there's a complete list. There's at least:Note as well that (at least for Google) this will only affect the search index, not the page ranking etc. Furthermore, as Stephen Ostermiller correctly pointed out in his comment below,
googleon
andgoogleoff
only work with the Google search appliance and have no effect on normal Googlebot, unfortunately.There's also an article on the Yahoo part2 (and an article describing that Yandex also honors
<noindex>
6). On thegoogleoff:
part, also see this answer, and the article I took most of the related information from.3Additionally, Google Webmaster Tools recommend using the
rel=nofollow
attribute4 for specific links (e.g. ads or links to pages not accessible/useful to the bots, such as login/signup). That means, the HTML a rel Attribute should be honored by the Google bots – though that's mainly related to page rank, not to the search index itself. Unfortunately, it seems there's norel=noindex
5,7. I'm also not sure if this attribute could be used for other elements as well (e.g.<DIV REL="noindex">
); but unless crawlers honor "noindex", that wouldn't make sense either.Further references:
REL="noindex"
a standard instead to be used with any HTML tag such as DIV/SPAN/P/A!)1 Wikipedia: Noindex
2 Which Sections of Your Web Pages Might Search Engines Ignore?
3 Tell Google to Not Index Certain Parts of Your Page
4 Use rel="nofollow" for specific links
5 Is it a good idea to use
<a href=“http://name.com” rel=“noindex, nofollow”>name</a>
?6 Using HTML tags — Yandex.Help. Webmaster
7 existing REL values