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

1.26K 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

With example: https://www.youtube.com/watch?v=Coz0JC1nnJI

Domain names (youtube.com) and their subdomains (www.youtube.com) are case-insensitive according to [RFC 4343](https://datatracker.ietf.org/doc/html/rfc4343). Everything after the domain (watch?v=Coz0JC1nnJI) is passed to the application server, without any changes, who can then treat that data in a case-sensitive fashion *if they want too* [like YouTube is doing].

In YouTube’s case, they are leveraging capital letters so that they can reference a greater number of videos, with such a short identifier. Here is an obligatory reference to Tom Scott’s (https://www.youtube.com/watch?v=gocwRvLhDf8).

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