Mohammad
Mohammad

Reputation: 21489

Why uppercase isn't usual in URL

I've visited many sites that most of them used lowercase in URLs like

stackoverflow.com/questions
google.com/webmaster
bing.com/news

Why using uppercase isn't more prevalent? Is there a problem using uppercase in URL? Is this a programming language problem?

Upvotes: 14

Views: 27450

Answers (2)

Pete
Pete

Reputation: 411

URLs are not case sensitive up to a point.

A URL of Foo.Bar will be treated the same as foo.bar and FOO.BAR. However, if a URL contains characters of a different case after the domain (.bar in my example), it is possible that changing the case of those characters will result in an error.

So, if a URL is provided as foo.bar/Baz, and you try to access foo.bar/baz, you risk accessing the wrong resource or encountering an error.

Remember that URLs with forward slash characters following the domain (as in foo.bar/baz) are treated (at least on the front end) as pointers to directories in a file system, and case sensitivity will be dependent on the file system the web server is using.

Upvotes: 9

Josh Vazquez
Josh Vazquez

Reputation: 310

URLs are generally case-insensitive and lowercase is used only for stylistic purposes and so it doesn't look like URLs are yelling at you. You can still find uppercase letters in URLs. For example, Amazon product pages use numbers and uppercase letters for the product ID. You can change the letters to lowercase and the same page loads.

Upvotes: 12

Related Questions