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
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).
Latest Answers