MENU

Embed YouTube video via a cookieless domain

  Previous article Next article  

Since the EU Cookie Law and the new General Data Protection Regulation law the use of (tracking) cookies is controversial. You need a cookie consent feature when embedding YouTube videos at your website to comply with these laws...

I was looking for a way to embed YouTube videos without asking for consent to set cookies. Thought of, and created, very complex cookieless (sub)domains, iframes in pop-ups, etc... But the solution is *very* simple.............. TOO [beeeep] SIMPLE!!!

  How to use

The solution is add "-nocookie" to the domain name!! youtube-nocookie.com is a domain that won't set cookies when you watch videos...

The usual method

<iframe src="//www.youtube.com/embed/8Q5BqakTy9U" frameborder="0" allowfullscreen></iframe>

Cookieless method

<iframe src="//www.youtube-nocookie.com/embed/8Q5BqakTy9U" frameborder="0" allowfullscreen></iframe>

  Working example


Buy Me A Coffee


  Comment Form

ReviewManager

Click here to open the form

ReviewManager

  3 Comments

Buy Me A Coffee

CMS Made Simple - Tutorials, Tips and Tricks - CMSMS

Embed YouTube video via a cookieless domain

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.2.19
  Last updated: 04-08-2019
  Comments: 3
  http://cms.ms/m0td


Buy Me A Coffee




Advertisement


Ads help me to help you! Thanks!

Ads help me to help you! Buy products from these advertisers!