Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the protocol name in URLs case sensitive?

Is hTTp://foo.com the same as Http://foo.COM?

I know that hostnames are not sensitive but path names and query parts are sensitive.

like image 356
Lothar Avatar asked Jan 27 '10 16:01

Lothar


People also ask

Is HTTP protocol case-sensitive?

By default, Web servers are expected to be case-sensitive. Although most HTTP servers support the HTTP specification that defines URLs as case-sensitive, some HTTP servers treat URLs as not case-sensitive.

Can a URL be case-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.

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.

Should URIs be case-sensitive?

Rule #5: Lowercase letters should be preferred in URI paths When convenient, lowercase letters are preferred in URI paths since capital letters can sometimes cause problems. RFC 3986 defines URIs as case-sensitive except for the scheme and host components. This URI is fine.


1 Answers

The scheme is case-insensitive: https://www.rfc-editor.org/rfc/rfc3986#section-3.1

The hostname is also case-insensitive, since it's DNS.

The rest is case sensitive.

like image 95
Tobu Avatar answered Sep 21 '22 18:09

Tobu