Are URLs Case Sensitive?
A URL, or Uniform Resource Locator, is a technical term for what is more commonly known as a website address. In a Web browser, the URL field is where a user can type or paste an address such as wisegeek.com. While domain names are not case-sensitive, the rest of the URL might be. In our example, this would be everything that follows “.com” as in wisegeek.com/are-urls-case-sensitive.htm.
Every website is hosted on a server, a type of computer that runs continuously to provide constant access to the websites it hosts. Servers running Windows® operating systems disregard case in URLs, interpreting identical spelling as being the same address. A server running a Linux® or UNIX® operating system, however, would interpret the two different capitalizations as pointing to two different page addresses. This could be a problem for some webmasters.
For example, a person named Jack has designed a website for gamers. Jack’s hypothetical site features blog pages, news, tips, cheats, and forums, is many pages deep and has built up quite a following over the years, funneling through several thousand visitors a day. When Jack was building the site, he used mixed-case lettering to name each page, such as “TipsandTricks.html,” because it was easier to read than “tipsandtricks.html.” In the embedded links, he used small case to point to pages. Other websites that point to Jack’s pages might also use small case lettering.
One day, Jack gets an email that his host service will be upgrading their servers, migrating websites to newer machines. Jack notices that once this happens, his traffic falls off significantly on many of his pages. Since his address hasn’t changed, Jack might wonder what’s happened.
If the new computers are running Linux® or UNIX® operating systems, Jack’s URLs would suddenly become case-sensitive, as would any folders he created on his website. Links to “.../tipsandtricks.html” would result in a 404 error page — a message announcing that the page could not be found. Over time, search bots would make the correct connections, but revenue and traffic would be lost in the interim. To correct the situation, he could request his host allow him to edit the 404-error page so that it forwards visitors to the correct addresses.
This case-sensitive rule also applies to folders. If a webmaster creates a folder on a Linux® or UNIX® host server, as “.../html/Folder1/” this is different from “.../html/folder1/” and none of the pages contained within said folder will be accessible to the Internet without the proper case specified in the embedded links.
While Microsoft® operating systems have dominated public servers, making case-sensitive URLs less of a consideration, this could be changing. Linux® provides attractive alternatives and the popularity of open source software continues to grow. Today’s webmasters will ideally create addresses, embedded links, and folders that can easily slide from one host or operating system to another. This should ensure traffic and revenue retention and make for a stress-free migration for webmasters and visitors alike.
@anon334768: Are you kidding me?
"Performance (not having to check/convert cases)."
It's such a miniscule performance hit to do an .EqualsIgnoreCase check or .to[Lower|Upper]Case conversion. Most good applications normalize user input. This is nothing new. Which brings me to your second point.
"Storage/memory (more values for each character)."
You get no increased storage or memory for the file system. Good practice for performance and usability sake is to make all publicly accessible files and directories either all lower or all upper case.
"That's a standard, a protocol. Microsoft once more chose to ignore it in their crappy products."
I don't think you know what standards and protocols are. The user is not supposed to have to worry about programmatic standards. The application and system should be designed to allow the user to make mistakes (because they will). It's a hit to usability to fault a user for typing "default" instead of "Default".
Don't fault Microsoft for thinking about the real end users. And gasp, actually making the jobs of developers on their systems a bit easier (yes I know MSoft does other things to make our lives hell, but oh well). Because if you're programming on an MSoft OS you are less likely to have to program for this issue.
For reference, Apache (the most common web server on *nix) has an option to go case-insensitive. This does not alter the fact that the web standard is that URLs are case sensitive, and if you want to change it you should be tackling the W3C, not the OS.
RE: The benefits of having a case sensitive website or file system...
1- Performance (not having to check/convert cases).
2- Storage/memory (more values for each character).
3- That's a standard, a protocol. Microsoft once more chose to ignore it in their crappy products.
I got here trying to understand why a google reference wouldn't work unless I observed the case sensitivity. News to me. Now I know.
Although I have to admit that there is no visible reason for having a case-sensitive file system, unix is so much better than windows (or dos, almost the same) that we don't need to even argue. Besides I trust the unix developers so there might be a reason, which none of us sees right now.
The way things work in the real world is that we have well-defined and standardized protocols, and the URL specification is one such standard.
That protocol is one of many that Microsoft has chosen to either ignore or subvert in their efforts to drive sales by forcing incompatibility with existing standards. But the fact is that, when it comes to URL's, case matters - case closed.
Reminds me why I prefer windows over Linux / Unix now. I think it is a mistake to have a case sensitive url.
What, if any, advantage is there in having the possibility to identify two different locations by a "name" that differs only in capitalization? To move the "George" example to locations, what reason could there be to have both "..../London" and "..../london", except to confuse visitors?
Consider the fact that case-sensitivity allows for exponential use of more concise URLs, especially for archival or link shortening purposes. Tinyurl, pastebin,bit.ly, goo.gl, et al. would not be in existence today without this.
@anon155822: I have no idea if you're serious, or not.
I have recently converted into a Linux user. Just because the computers are more powerful does not mean they need more bloat. Why should you take a hit to your performance in order to not have to worry about what case you write in?
In my opinion, windows should become case sensitive and go for high performance.
A case sensitive operating system is absolutely asinine from a real-world and usability standpoint. I mean, George, george and "GEORGE are all the same person, unix people! We have to first convince the narrow-minded idiots who someone got into a position of control, then get the freaking operating system brought up to modern times. Asinine.
I dare anyone to post the benefits of having a case sensitive website or file system? I don't think it is any big help or harm. I would name my files the same regardless.
A case sensitive file system is fine, and we all ought to use Unix-like systems rather than Windows, if those are our only choices, because they have an acceptably consistent design without as much (though still too much) accidental complexity as you have on a DOS/Windows system.
However, the definition of a URL ought not to be implementation dependent. We ought not to be discussing O/S file systems at this level of abstraction.
In my opinion, case insensitive would be the better choice and the Unix web servers should be responsible for arranging for the correct files to arrive even if it means taking a performance hit.
Sure UNIX (born in 1970) is the one that should change. After all, Windows (born in 1982) is the end-all, be-all in Operating Systems!
As an IT Consultant, I love it when clients choose Windows Servers - it's a virtual guarantee that I'll make 10-50 times more income off of that client for future work!
By the way: Windows is case-insensitive solely because DOS was case insensitive. DOS -- now there was a great OS!
I agree that a case sensitive file system is crazy!
A case sensitive file system is necessary. Windows users should use a different operative system or stick with XBOXes. Apple should change its default to case-sensitivity.
A case sensitive file system is crazy. Linux/Unix should fix it and join the real/modern world.
Post your comments