Earlier this week, over on Reddit, web developer unicorn4sale shared an interesting and frequently forgotten bit of how the internet works. While we typically look at urls as using dots solely to divide the domain name — separating “youtube” and “com”, for example — it’s perfectly valid to include an additional dot at the end of the domain name. As this fact is not widely known, many web developers do not account for it, leading to particularly interesting results.

If you add the extra dot to a YouTube video URL, as seen below, you’ll find that YouTube’s pre-video ads generally no longer play.

Normal URL, normal ads

https://www.youtube.com/watch?v=M6KZ1sQXmLI

Altered URL (note the bolded dot), little to no ads

Buy Me A Coffee

https://www.youtube.com./watch?v=M6KZ1sQXmLI

While the ad-removing trick works on the main YouTube site, adding the extra dot to YouTube Music’s URL breaks the web app entirely, rather than simply stopping ads from loading.

Unicorn4sale goes into a little bit more detail into the technical aspects of what’s going on.

It’s a commonly forgotten edge case, websites forget to normalize the hostname, the content is still served, but there’s no hostname match on the browser so no cookies and broken CORS — and lots of bigger sites use a different domain to serve ads/media with a whitelist that doesn’t contain the extra dot

We have no doubt that Google will find a way to resolve this ad removal issue at least for YouTube within the next few days, especially as the trick’s popularity increases.

READ
What is a Keylogger? How to Detect Keyloggers on Your Computer and Mobile Phone