Two of the most widely used operating system file systems for serving web serverscontent 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