If you are one of those people who hate paywalls and YouTube ads then you no longer need to get third-party extensions, ad blockers, or try any other complicated methods.
A Reddit user (via The Next Web) by the username "u/unicorn4sale" has found a simple trick that will allow users to block ads on YouTube and even bypass paywalls. All you need to do is put a period after ".com' and it will block ads automatically. So if you are visiting "www.youtube.com/xyz, " you will need to change it to "www.youtube.com./xyz." This will block the ads on YouTube and will let you watch videos without any advertisements. The trick also works on multiple websites that hide their content behind a paywall.
The reason why this works has to do with the hostname. When you put a period in the URL, it results in no hostname match. When this happens, the main content of the website is loaded but additional features like ads and cookies break and are not loaded. The loophole can be fixed by websites as they can normalize the hostname by using "a different domain to serve ads/media with a whitelist that doesn’t contain the extra dot.”
The loophole works on desktop and mobile but mobile users will have to load the desktop version of the site. Unfortunately, there is no way to skip ads or paywalls on mobile apps. Please do keep in mind that creators pay for their expenses using ad revenues so before you go on an ad-free YouTube spree, consider supporting your favourite creators. Alternatively, you can also purchase YouTube Premium membership to get an ad-free experience.
The trick works on several websites at the time of the writing but it has a simple fix so there is only a matter of time before websites and even YouTube patch the loophole.