Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Forward slash at end of url structure ?

         

jaffstar

9:58 am on Aug 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In terms of a CMS structure and SEO linking, the following are considered two different URL structures in Google (and we are finding two different versions listed) :

www.domain.com/location/keyword-keyword
www.domain.com/location/keyword-keyword/

In some other sites, if I dont enter the "/" I get redirected to the non-www.

In this site, there is a hybrid, some urls have the "/" some do not and I am finding duplication issues.

Therefore, what is the correct method with or without "/".

My vote would be to include the "/".

tedster

4:55 pm on Aug 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Technically the two cases certainly are different. Being precise, when a URL ends with a forward slash, that means it is the index of a directory. When it doesn't end with a forward slash, that means it is a file within a directory - usually one among several.

This technical convention was established long before the extensive URL rewriting that we see today. Most CMS rewrite URLs with no regard for it, as you've discovered. Nevertheless, being casual about those closing slashes in the filepath can create a canonical confusion.

So I'd say it all depends on your specific site. If example.com/location/keyword-keyword is the only URL in /location/ then do not use the final slash. Have the server 301 redirect all requests with the slash to the no-slash version.

It seems more likely that example.com/location/keyword-keyword will have a few siblings at /location/ so I agree with having the server 301 redirect those no-slash requests to with-slash URLs. This is also a situation where the canonical link tag can be your friend.