1

我最近开始使用Google Webmaster Tools

看到谷歌试图索引多少链接,我感到非常惊讶。

http://www.example.com/?c=123
http://www.example.com/?c=82
http://www.example.com/?c=234
http://www.example.com/?c=991

这些都是作为来自合作伙伴网站的链接而存在的广告系列。

目前他们都被我的机器人文件拒绝,直到网站完成 - 就像网站上的每个页面一样。

我想知道处理此类链接的最佳方法是什么 - 在我减少 robots.txt 文件的限制之前。

我担心它们会被视为不同的 URL 并开始出现在谷歌的搜索结果中。它们都对应于同一页面 - 给予或接受。我不希望人们按原样找到它们并单击它们。

到目前为止,最好的想法是呈现一个包含查询字符串的页面,如下所示:

 // DO NOT TRY THIS AT HOME. See edit below
 <% if (Request.QueryString != "") { %>

    <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

 <% } %>

我需要这样做吗?这是最好的方法吗?

编辑:事实证明这不是一个好方法。事实证明,Google 在与另一个没有 NOINDEX 的页面具有相同内容的页面上看到了 NOINDEX。显然它认为它们是同一件事,并且 NOINDEX 优先。结果,我的网站完全从 Google 中消失了。警告:这可能是我同时做的其他事情,但我不会冒险使用这种方法。

4

4 回答 4

4

This is the sort of thing that rel="canonical" was designed for. Google posted a blog article about it.

于 2009-05-02T10:00:06.120 回答
1

是的,Google 会将它们解释为不同的 URL。

Depending on your webserver you could use a rewrite filter to remove the parameter for search engines, eg url rewrite filter for Tomcat, or mod rewrite for Apache.

Personally I'd just redirect to the same page with the tracking parameter removed.

于 2009-05-02T09:55:13.387 回答
0

这似乎是最好的方法,除非页面存在于它自己的文件夹中,在这种情况下,您可以修改 robots.txt 文件以忽略该文件夹。

于 2009-05-02T09:54:19.147 回答
0

For resources that should not be indexed I prefer to do a simple return in the page load:

if (IsBot(Request.UserAgent)
    return;
于 2009-05-02T10:12:27.713 回答