Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should URL be case sensitive?

I noticed that

HTTP://STACKOVERFLOW.COM/QUESTIONS/ASK 

and

http://stackoverflow.com/questions/ask 

both works fine - actually the previous one is converted to lowercase.

I think that this makes sense for the user.

If I look at Google then this URL works fine:

http://www.google.com/intl/en/about/corporate/index.html   

but this one with "ABOUT" is not working:

http://www.google.com/intl/en/ABOUT/corporate/index.html    

Should the URL be case sensitive?

like image 317
Imageree Avatar asked Nov 03 '11 14:11

Imageree


People also ask

Should URLs be all lowercase?

Stick to one version: The lowercase pattern is recommended (because there will always be people who will link to this more traditional version). Use 301 redirects: If you see URLs with capital letters get into index (someone linked to it or you changed your content management system and it capitalized some URLs).

Do cases matter in URL?

The cases of letters in a URL absolutely do matter to Google. Two URLs could look the same, and even lead to the same content, but they could be treated as different URLs if one has a capital letter and the other doesn't.

Is URL capital sensitive?

It may surprise you but, yes, URLs are case sensitive. And, if you have both upper- and lowercase versions of your site's domain, you may be unintentionally making Google's job harder — and hurting your site's own performance.

Should URL be capitalized in a sentence?

See web addresses. web—When referring to the World Wide Web, web is not capitalized. web addresses—Also known as URLs.

What is url case sensitivity and why should you care?

As mentioned earlier, URL case-sensitivity depends on the operating system of your website’s server. If you want to make your URLs case sensitive for the different pages of your site, use a Linux or Unix-based server. But as mentioned earlier, having case sensitive URLs may cause problems later on the maintenance side.

Is a domain name case sensitive?

Domain names are not case sensitive, but there are times when URLs are. This means you can enter a website’s URL in all capital letters, and it will still bring you the designated homepage, but a URL depends on the server that hosts the site and whether or not it supports different cases. What is the Difference Between a Domain Name and URL?

Does it matter if a URL is uppercase or lowercase?

Google’s John Mueller clarifies that URLs are case sensitive, so it matters whether the characters are uppercase or lowercase. Variations in cases can make one URL different from another, similar to how a URL with a trailing slash is different from a URL without the slash.

Why do URLs have case-sensitive filenames?

In the early days URLs mapped very directly to filenames, and the files were generally on Unix-like machines, and Unix-like machines have case-sensitive filenames. So my guess is that it just happened that way for implementation convenience, and usability (for end-users) was never even considered.


2 Answers

According to W3's "HTML and URLs" they should:

There may be URLs, or parts of URLs, where case doesn't matter, but identifying these may not be easy. Users should always consider that URLs are case-sensitive.

like image 161
jldupont Avatar answered Sep 28 '22 07:09

jldupont


All “insensitive”s are boldened for readability.

Domain names are case insensitive according to RFC 4343. The rest of URL is sent to the server via the GET method. This may be case sensitive or not.

Take this page for example, stackoverflow.com receives GET string /questions/7996919/should-url-be-case-sensitive, sending a HTML document to your browser. Stackoverflow.com is case insensitive because it produces the same result for /QUEStions/7996919/Should-url-be-case-sensitive.

On the other hand, Wikipedia is case sensitive except the first character of the title. The URLs https://en.wikipedia.org/wiki/Case_sensitivity and https://en.wikipedia.org/wiki/case_sensitivity leads to the same article, but https://en.wikipedia.org/wiki/CASE_SENSITIVITY returns 404.

like image 37
jdh8 Avatar answered Sep 28 '22 06:09

jdh8