To Slash or Not to Slash in your Filename: Yes it Matters!
 by Casey Markee

To Slash or Not to Slash in your Filename: Yes it Matters!

  • We were discussing a new site with our tech team and they suggested that we add trailing slashes to the end of all of our URLs, such as Won't this cause SEO issues, as Google will recognize this as a folder, not a landing page? I also mentioned that this would cause issues with our links, as almost all inbound links will not include a trailing slash so 301s would need to be setup to forward all click-thrus to the "correct" URL. It seems that any server processing saved from not having to add the trailing slash will be lost with processing of 301s. Have you encountered any issues with this before? If so, do you have any data or info that could help make my case?

Answer: This is a good question and one we actually get quite a bit. Although it's common for URLs with a trailing slash to indicate a directory, it's becoming more and more common to see it on regular file names as well. Because of this, Google has, for some time, treated them BOTH the same.

Google covered this issue in detail back in a 2010 Webmaster Blog post that also lays out the suggested approach on handling this for Webmasters. It's definitely worth a read.

Basically, in your case, we (and Google) would suggest the actual configuration isn't important as long as only one version of the page and content is accessible online. You also must be consistent with what you choose AND that it returns a 200 status code AND the other (be it the slash or no slashed URL) redirects with a 301. In other words, as long as you prevent your server from processing two versions of a page (one with a slash, one without) as both reachable and indexable, then you have eliminated any duplicate content issues and are good to go.

Now, here's the important takeaway: there is a slight performance hit when configuring a server to drop the trailing slash from subdirectories, as its natural ...