homepage Welcome to WebmasterWorld Guest from 23.22.217.122
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Trailing Slash vs. Index.html
jk3210




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

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




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

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




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

Thanks much, phranque.

g1smd




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

Never link to named index file.

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

lucy24




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

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




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

another three variants...

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved