有没有办法阻止 Googlebot 对页面的某些部分建立索引?

发布于 2024-08-05 18:32:19 字数 1559 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

最丧也最甜 2024-08-12 18:32:19

你所要求的,实际上是无法完成的,谷歌要么占据整个页面,要么不占据任何页面。

不过,您可以采取一些偷偷摸摸的技巧,例如插入您不希望在 iFrame 中建立索引的页面部分,并使用 robots.txt 要求 Google 不要为该 iFrame 建立索引。

What you're asking for, can't really be done, Google either takes the entire page, or none of it.

You could do some sneaky tricks though like insert the part of the page you don't want indexed in an iFrame and use robots.txt to ask Google not to index that iFrame.

微凉 2024-08-12 18:32:19

简而言之,不 - 除非您使用 Google 不鼓励的隐藏功能。

In short NO - unless you use cloaking with is discouraged by Google.

诠释孤独 2024-08-12 18:32:19

请从此处查看官方文档

http://code.google .com/apis/searchappliance/documentation/46/admin_crawl/Preparing.html

转到“从索引中排除不需要的文本”部分

<!--googleoff: index-->
here will be skipped
<!--googleon: index-->

Please check out the official documentation from here

http://code.google.com/apis/searchappliance/documentation/46/admin_crawl/Preparing.html

Go to section "Excluding Unwanted Text from the Index"

<!--googleoff: index-->
here will be skipped
<!--googleon: index-->
欢烬 2024-08-12 18:32:19

如果您担心的是您不希望出现在搜索结果片段中的页面部分,则可以使用 data-nosnippet 属性

https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag #data-nosnippet-attr

If the concern is parts of the page that you don't want appearing in the search result snippet, you can use data-nosnippet attribute

https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#data-nosnippet-attr

折戟 2024-08-12 18:32:19

在您的服务器上使用 PHP 或 ASP 通过 IP 检测搜索机器人。然后将您希望索引的页面版本提供给属于该列表的 IP 地址。在页面的搜索引擎友好版本中,使用规范链接标记向搜索引擎指定您不希望被索引的页面版本。

这样,包含确实想要索引的内容的页面将仅按地址进行索引,而仅对您希望索引的内容进行索引。这种方法不会让您被搜索引擎屏蔽,并且是完全安全的。

At your server detect the search bot by IP using PHP or ASP. Then feed the IP addresses that fall into that list a version of the page you wish to be indexed. In that search engine friendly version of your page use the canonical link tag to specify to the search engine the page version that you do not want to be indexed.

This way the page with the content that do want to be index will be indexed by address only while the only the content you wish to be indexed will be indexed. This method will not get you blocked by the search engines and is completely safe.

拔了角的鹿 2024-08-12 18:32:19

找到了使用某些重复内容的有用资源,并且不允许搜索引擎对此类内容进行索引。

<p>This is normal (X)HTML content that will be indexed by Google.</p>

<!--googleoff: index-->

<p>This (X)HTML content will NOT be indexed by Google.</p>

<!--googleon: index>

Found useful resource for using certain duplicate content and not to allow index by search engine for such content.

<p>This is normal (X)HTML content that will be indexed by Google.</p>

<!--googleoff: index-->

<p>This (X)HTML content will NOT be indexed by Google.</p>

<!--googleon: index>
反目相谮 2024-08-12 18:32:19

所有搜索引擎要么索引整个页面,要么忽略整个页面。实现您想要的唯一可能的方法是:

(a)同一页面有两个不同版本

(b)检测使用的浏览器

(c)如果它是搜索引擎,则提供页面的第二个版本。

此链接可能会有所帮助。

All search engines either index or ignore the entire page. The only possible way to implement what you want is to:

(a) have two different versions of the same page

(b) detect the browser used

(c) If it's a search engine, serve the second version of your page.

This link might prove helpful.

一曲爱恨情仇 2024-08-12 18:32:19

有机器人的元标记,还有 robots.txt,您可以使用它们限制对某些目录的访问。

There are meta-tags for bots, and there's also the robots.txt, with which you can restrict access to certain directories.

执笔绘流年 2024-08-12 18:32:19

是的,您当然可以通过创建自定义 robots.txt 来阻止 Google 对您网站的某些部分建立索引,并编写您不想对哪些部分(如 wpadmins)或特定的帖子或页面建立索引,这样您就可以通过创建此 robots.txt 轻松地做到这一点。 txt 文件。在创建之前检查您的网站 robots.txt,例如 www.yoursite.com/robots.txt。

Yes definitely you can stop Google from indexing some parts of your website by creating custom robots.txt and write which portions you don't want to index like wpadmins, or a particular post or page so you can do that easily by creating this robots.txt file .before creating check your site robots.txt for example www.yoursite.com/robots.txt.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文