Forum Moderators: phranque

Message Too Old, No Replies

Trailing Slash vs. Index.html

         

jk3210

12:09 am on Sep 27, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Geez, after 17 years on the net I feel like I should know this one, but I never really considered it before...

Will Google see these two urls as the same location or different?

www.example.com/dir/dir/
www.example.com/dir/dir/index.html

phranque

3:49 am on Sep 27, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



those are different urls and i've seen examples of both or the wrong one being indexed.
requests for the second url should be redirected to the first url using a 301 status code.
also your default directory index document setting should be configured to use index.html.

jk3210

4:55 am on Sep 27, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks much, phranque.

g1smd

5:36 am on Sep 27, 2012 (gmt 0)

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



Never link to named index file.

Link to href="/" or to href="/folder/"

lucy24

6:01 am on Sep 27, 2012 (gmt 0)

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



Will Google see these two urls as the same location or different?

www.example.com/dir/dir/
www.example.com/dir/dir/index.html

It gets better :) Unless you've given instructions to the contrary, those can end up as four URLs:

www.example.com/dir/dir/
example.com/dir/dir/
www.example.com/dir/dir/index.html
example.com/dir/dir/index.html

g1smd

7:47 am on Sep 27, 2012 (gmt 0)

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



another three variants...

www.example.com./dir/dir/
www.example.com:80/dir/dir/
www.example.com.:80/dir/dir/