How does the URL on YouTube videos know that the unique part of the URL is case-sensitive?

822 views

Whenever I go to YouTube or any website at all, it doesn’t matter if I write the website name in lowercase letters or uppercase letters, I will land on the same website. But whenever we go to a video and even replace 1 letter with lowercase or uppercase, the link doesn’t work.

How does the URL know that one section is not case-sensitive while the other section is case-sensitive?

I can understand why that’s the case. To keep the URLs unique. just in case something similar comes up. But what’s happening behind the scenes?

In: 52

22 Answers

Anonymous 0 Comments

The domain part of the website (e.g. YouTube.com) is case insensitive, which means it doesn’t matter if it’s lower or uppercase, just think that it is all turned into lower case.

The domain part is just used to figure out what computer on the internet to send your message to, which would be a server at YouTube.

The bit after this, e.g “watch”, or the video ID is not used until later on in the process. This part of the URL will be processed by the YouTube server and systems. Here it is case sensitive.

YouTube will store the video ID in a database somewhere and needs to search for it to retrieve the video. Here it matters that the upper/lower cases match, because it allows them to store a lot more IDs (more unique combinations).

You are viewing 1 out of 22 answers, click here to view all answers.