Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Does it make any difference to SEO ratings what-so-ever if your url has a trailing slash:

as opposed to one that does not:
share|improve this question
Same (now closed) question on StackOverflow with some good answers: Trailing slash in URLs - which style is preferred? –  Stephen Ostermiller Apr 13 at 13:43

4 Answers 4

up vote 28 down vote accepted

Read the full blog post by Google here,, it covers this exact topic.

Long story short Google does not care if you have a trailing slash. However, it will treat the below 2 paths as separate pages.

If you need to have both of the above and they are the same content your best option is to do a 301 Redirect to one of them from the other.

If that isn't an option you will want to add a <link rel="canonical" href="your link"/> to both pages which will define which one is the master or parent. Matt Cutts has a great article here,, that covers the topic in its entirety.

share|improve this answer
That is good practice anyway, because you never know what people will put as the URL when linking to you. I'd hate to get a permanent link on a PR8 site that was not to my canonical URL :) –  Tim Post Aug 24 '10 at 13:52
This is not really what the canonical tag is for. The correct thing to do is to 301 redirect the slash version to the non-slash version (or vice versa, depending on which you want), which is exactly what the Google webmaster central blog entry you linked suggests. Use a canonical here only if a 301 is not possible. –  Tim Fountain Aug 24 '10 at 14:46
@Tim - Good point. You are right, the canonical is only the backup choice. I modified my answer to be more correct. Thanks! –  RandomBen Aug 24 '10 at 14:55
Server side applications also treat the paths differently. In Django, will be redirected to Something to keep in mind. :) –  citadelgrad Aug 24 '10 at 15:04

In addition to RandomBen's point about search engines treating URLs with a trailing slash versus without as two different URLs, I'd like to add this. I generally use the trailing slash to indicate a category, while I don't use a trailing slash for pages that are at the end or bottom of a hierarchy. Slash your categories, don't slash anything else. If you're rewriting URLs, this most closely matches the natural file structure. However, you should make sure that each category in your path exists, or you could end up with some confused and frustrated users. In your example URL, "some" and "slug" should both be accessible pages.

share|improve this answer
That can be quite reasonable. If you want to emulate a file system in your URLs, would it then perhaps be neater to 'go all the way', and give your stub pages a (possibly fake) extension, like .html or .py, .pl, .asp, or something else. Just having no trailing slash does not communicate "stub page" to me, it could just have been forgotten -- but a "file" extension does. –  Jesper Mortensen Sep 4 '10 at 21:51
@Jesper "Who says a file name needs an extension?? take a look on a *nix machine sometime"… –  Yarin Oct 31 '11 at 23:03

There is one case in which a trailing slash will help with search engine optimization (SEO). That is the case that your document has what appears to be a file extension that is not .html. This becomes an issue with sites that are rating websites. They might choose between these two urls:


In such a case, I would choose the one with the trailing slash. That is because the .com extension is an extension for Windows executable command files. Search engines and virus checkers often dislike URLs that appear that they may contain malware distributed through such mechanisms. The trailing slash seems to mitigate any concerns, allowing the page to rank in search engines and get by virus checkers.

If your URLs have no . in the file portion, then I would recommend omitting the trailing slash for simplicity.

(This is the same answer I posted on StackOverflow)

share|improve this answer

URL's with and without slashes are treated as two different URL's. Its absolutely essential that you fix this to avoid duplicate content problems. Generally, this affects the whole site, as every page has a duplicate.

  1. Standardize site wide URL's
  2. Use 301 redirects or canonicalization to fix URL's
  3. Do an internal link audit to make sure there are no unnecessary redirects and all internal links point to standardized URL's.
  4. You may also check external links. Ideally they too should point to standardized URL's.

See rankings improve.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.