Welcome to WebmasterWorld Guest from 54.161.25.142

Message Too Old, No Replies

Url canonicalization and 301 redirect

     
2:19 am on Nov 27, 2006 (gmt 0)

10+ Year Member



For some reason, our internal links to the same page are not same, for exmaple, some are /dir/default.htm or /dir/index.htm and others are /dir/. According to Matt Cutts's suggestion, we want to change /dir/default.htm and /dir/index.htm to /dir/ and redirect /dir/default.htm and /dir/index.htm to /dir/ using 301.
Is it OK? Anybody has done like that? Or do you have any other suggestion?
10:56 pm on Nov 27, 2006 (gmt 0)

10+ Year Member



You might want to check and see which version Google presently has in its index. Typically, it will pick one version to display, and that would be the one that is most popular via links to it.

For example, if there are 20 links to dir/index.htm and only two to /dir/, Google will most likely list dir/index.htm, and in my mind, that would be the version you would want to keep for minimum disruption to your rankings. If it's 20 for /dir/ and two for dir/index.htm, then keep /dir/ and bag the other.

The other consideration would be if there are external links to the page using one form or the other -- external links are harder to change, and are potentially more valuable.

Whichever version you decide to keep, do the 301 from the version you don't keep to the version you do, and change all the 'wrong' form links on your site the the 'right form'.

HTH

3:54 am on Nov 28, 2006 (gmt 0)

10+ Year Member



Thanks, jonrichd.

I've made 301 redirection for some pages, but I couldn't visit those pages using IE, and the firefox showed "Firefox has detected that the server is redirecting the request for this address in a way that will never complete."
What's wrong? Any response will be appreciated.

4:30 am on Nov 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You have to watch out for the fact that the server will automaticly treat the / form for a name internally as /index.htm[l] thus forming a redirect loop if you redirect /index.htm[l] to /.

Somewhere in the deep recesses of WebmasterWorld there is a thread or two on this matter. A google site search might find it for you.

5:21 am on Nov 28, 2006 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Here's one good thread for Apache: [webmasterworld.com...]

I don't know of a native solution in IIS - I've heard you can do it with ISAPI Rewrite, but that's a third party helper application.

8:06 pm on Nov 28, 2006 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Try this:

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.(html?Šphp)\ HTTP/
RewriteRule ^(([^/]*/)*)index\.(html?Šphp)$ http://www.example.com/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*default\.asp\ HTTP/
RewriteRule ^(([^/]*/)*)default\.asp$ http://www.example.com/$1 [R=301,L]

11:24 pm on Nov 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



g1smd,

You must be more carefull, that has been repeated so many times that WebmasterWorld will get dup dinged ;-).

11:38 pm on Nov 28, 2006 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I'm waiting for the certificate from Matt Cutts as you speak...
 

Featured Threads

Hot Threads This Week

Hot Threads This Month