Does anyone know if Google will punish a site if the homepage (with or without the trailing slash) returns a 200 OK header response?
I have tested tons of sites using an online redirect checker (CNN, NY Times, FOX News, Wikipedia, etc...) and they all return 200 "ok" with or without the trailing slash.
I know all inner pages need to use one or the other, but it appears the homepage is an exception. What do you all think?
PS, I'm using URLRewrite in IIS7 to force www, lowercase, and remove trailing slashes. It seems the homepage is the only page not affected by the trailing slash rule.
For example, using a tool, I checked the following URLs. They are both "Direct Links". Neither is a 301 redirect:
Numerous other examples produce the same results.
Here is my URLRewrite code (web.config
)
<rules>
<rule name="CanonicalHostNameRule1" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.example\.com$" negate="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="http://www.example.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>
OK, so here is the official answer from the Google Blog
And I quote...
"Rest assured that for your root URL specifically, http://example.com
is equivalent to http://example.com/
and can’t be redirected even if you’re Chuck Norris."
So there you have it. The root URL is not only safe with or without a trailing slash, but it might even be impossible to 301 redirect one to the other.
I would advise maintaining a set style (using one or the other) to prevent directory confusion. There should be no difference on the SEO side whatsoever. Using 301 redirects may be an option in this case if you feel you require it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With