Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Using rel canonical on /index.php to point to www.domain.com

         

DiscoStu

4:25 pm on Nov 4, 2011 (gmt 0)

10+ Year Member



Is this recommended?

I.e. on domain.com/index.php

put

<link rel="canonical" href="http://www.domain.com/" />

to avoid canonicalization issues (and to avoid the 301 index to domain loop)

tedster

5:19 pm on Nov 4, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I recommend it as standard procedure on every website I work with.

g1smd

5:37 pm on Nov 4, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



avoid the 301 index to domain loop

The loop is easily avoided with an extra line of code: redirect index requests only when "index" appears in the original URL request.

This is very easy to achieve on Apache servers and there are hundreds of previous code examples in the WebmasterWorld Apache forum.