Should URL paths be case sensitive?

Two of the most widely used operating system file systems for serving web content have have very different settings for case sensitivity of URLs by default. Whether or not your URLs are case sensitive is likely a function of which you are using:

  • Microsoft IIS running on Windows - case insensitive URLs - shows the same content regardless of capitalization.
  • Apache HTTPD Server running on Linux - case sensitive URLs - gives a 404 not found error for incorrect capitalization.

In my opinion, neither default is ideal:

  • Showing the same content regardless of capitalization makes crawling your web site harder. Search engines consider the same content on multiple URLs to be duplicate content.
  • Showing error pages for incorrect capitalization is not user friendly. Users are not usually mindful of capitalization when they type.

The ideal solution would be to show the page only when the URL is correctly capitalized. For incorrect capitalization, the user should be 301 redirected to the preferred capitalization. There are some ways that this can be accomplished:

  • For Apache, mod_speling can be enabled which will do the case insensitive redirects.
  • For Apache, a mod_rewrite rule can force all URLs to be lowercase.
  • For IIS, a rule can be added to force all URLs to be lowercase

Here is Google's position from an archived live chat session (the link is now dead):

*Does inconsistent capitalization of URLs cause duplicate content issues and dilution of page rank? For example www.site.com/abc vs www.site.com/Abc. On Windows hosts, these are the same page, but are different pages on Unix hosts.

JohnMu: Hi John, based on the existing standards, URLs are case-sensitive, so yes, these would be seen as separate URLs. Since the content on the URLs is the same, we'll generally recognize that and only keep one of them. However, we'd recommend that you try to keep all links going to one version of the URL. Keep in mind that this also applies to robots.txt files.*

The IE Team recommends picking a file casing convention and adhering to it strictly as it can improve performance.