4

有谁知道如果主页(带或不带斜杠)返回 200 ok 标头响应,Google 是否会惩罚网站?

我已经使用在线重定向检查器(CNN、NY Times、FOX News、Wikipedia 等)测试了大量网站,它们都返回 200“ok”,无论是否带有斜杠。

我知道所有内页都需要使用其中一个,但主页似乎是个例外。大家怎么看?

PS,我在 IIS7 中使用 URLRewrite 来强制 www、小写和删除尾部斜杠。主页似乎是唯一不受斜杠规则影响的页面。

谢谢!

编辑 例如,使用此在线工具: http: //www.internetofficer.com/seo-tool/redirect-check/ 以下 URL 是“直接链接”。301 重定向也不是... http://www.wikipedia.org http://www.wikipedia.org/

许多其他示例产生相同的结果。

编辑 2 这是我的 URLRewrite 代码(web.config)

    <rules>
        <rule name="CanonicalHostNameRule1" stopProcessing="true">
            <match url="(.*)" />
            <conditions>
                <add input="{HTTP_HOST}" pattern="^www\.domain\.com$" negate="true" />
            </conditions>
            <action type="Redirect" redirectType="Permanent" url="http://www.kurtzandblum.com/{R:1}" />
        </rule>
        <rule name="LowerCaseRule1" stopProcessing="true">
            <match url="[A-Z]" ignoreCase="false" />
            <action type="Redirect" redirectType="Permanent" url="{ToLower:{URL}}" />
        </rule>
        <rule name="Remove trailing slash" stopProcessing="true">
            <match url="(.*)/$" />
            <conditions>
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            </conditions>
            <action type="Redirect" redirectType="Permanent" url="{R:1}" />
        </rule>
    </rules>
4

2 回答 2

10

好的,这是来自谷歌博客的官方答案

我引用...“请放心,对于您的根 URL,http ://example.com等同于http://example.com/,即使您是 Chuck Norris,也无法重定向。”

所以你有它。根 URL 不仅带有或不带有斜杠是安全的,而且甚至可能无法 301 将一个重定向到另一个。

于 2012-07-07T05:04:26.627 回答
1

我建议保持一套风格(使用一种或另一种)以防止目录混乱。SEO方面应该没有任何区别。在这种情况下,如果您觉得需要,可以选择使用 301 重定向。

于 2012-07-06T03:24:41.647 回答