It’s so stupidly simple, you gotta wonder how we missed this all these years. Adding a dot to the end of a domain name throws off the browser’s cookie handling (breaks CORS too). This hack works on YouTube (for now, anyway) and many other websites that operate behind paywalls (e.g. New York Times).
For instance. Change this address:
Add a tube at the end of the domain name to remove all advertisements.
On YouTube, the trick removes pre-roll and mid-roll ads.
The hack works because normalizing the hostname is not a common practice and most paywall-type websites utilize whitelists and a different domain to serve advertisement. And yes, adding a dot at the end of the hostname is perfectly valid.
Remember, a fully qualified domain name (FQDN) is read in reverse. So https://www.youtube.com is read as the www server in the youtube domain in the com top-level domain. Only “com” is not really the top level domain – the full-stop is. So www.youtube.com. is perfectly valid according to DNS rules.
Of course you can always subscribe to YouTube Premium to remove ads…