Functionality vendor · Google LLC
YouTube Cookies: List With Purpose and Retention
Last verified 2026-10-17 · Updated 2026-10-17
On this page
Cookies YouTube Sets on Your Site
The YouTube embed player sets 5 cookies on .youtube.com as soon as a video loads, led by YSC and VISITOR_INFO1_LIVE, and sets them before the visitor presses play.
| Name | Type | Category | Party | Retention | What it does |
|---|---|---|---|---|---|
__Secure-ROLLOUT_TOKEN | Cookie | Analytics | Third-party | 180 days (6 months) | The __Secure-ROLLOUT_TOKEN cookie lets YouTube launch new features and measure their impact, for 6 months. |
__Secure-YNID | Cookie | Functionality | Third-party | 180 days (6 months) | The __Secure-YNID cookie is the YouTube cookie that replaces VISITOR_INFO1_LIVE for preferences and analytics, for 6 months. |
VISITOR_INFO1_LIVE | Cookie | Functionality | Third-party | 180 days (6 months) | The VISITOR_INFO1_LIVE cookie lets YouTube personalise recommendations from past views for 6 months, and Google is replacing the cookie with __Secure-YNID. |
VISITOR_PRIVACY_METADATA | Cookie | Functionality | Third-party | 180 days (6 months) | The VISITOR_PRIVACY_METADATA cookie arrives with the other YouTube cookies when the player loads, and Google publishes no purpose for it on its cookie page. |
YSC | Cookie | Functionality | Third-party | Session | The YSC cookie is a YouTube functionality cookie that guards an embedded video session for the browser session and needs consent in the EU. |
Scripts, Pixels, and Endpoints YouTube Loads
YouTube loads 2 known scripts, pixels, and data endpoints. Each row gives the host to look for in the Network tab of Chrome DevTools or in a cookie scanner report.
| Type | Resource | Host | What it does |
|---|---|---|---|
| Iframe | YouTube embed (youtube.com) | youtube.comwww.youtube.com | The YouTube embed player loads the video from www.youtube.com/embed/ and writes the YSC and VISITOR_INFO1_LIVE cookies with its first response. |
| Iframe | YouTube (Privacy Mode) embed (youtube-nocookie.com) | youtube-nocookie.comwww.youtube-nocookie.com | The privacy-enhanced YouTube player loads the video from www.youtube-nocookie.com/embed/, and its first response sets no cookie. |
Does YouTube Need Consent?
Yes, the YouTube cookies need consent in the EU and the UK, and need no prior opt-in in California. The table gives the rule for each law, taken from the page of the YSC cookie.
| Law | Consent before the cookies are set | Opt-out right | Source |
|---|---|---|---|
| EU ePrivacy Directive + GDPR | Required | Withdraw at any time | Article 5(3), ePrivacy Directive |
| UK PECR | Required | Withdraw at any time | Regulation 6 and Schedule A1, PECR |
| California CCPA | No general opt-in | None while the vendor acts as a service provider | Cal. Civ. Code 1798.120 |
The consent table describes what each law requires and is not legal advice. Whether a law applies to your site depends on where your visitors are, where your business is based, and how you set up YouTube, such as the embed domain of each video.
Read the reason for each answer in the consent rules for the YSC cookie.
How to Add YouTube to a Consent Banner
Add YouTube to a consent banner by holding back the script that inserts the YouTube player until the visitor accepts functionality cookies. Both TermsFeed products block YouTube in the Functionality category.
Add YouTube to TermsFeed Free Cookie Consent
TermsFeed Free Cookie Consent runs a tagged script only after the visitor accepts its category. Change type="text/javascript" to type="text/plain" and add data-cookie-consent="functionality".
<div id="youtube-1"></div>
<script type="text/plain" data-cookie-consent="functionality">
document.getElementById('youtube-1').innerHTML =
'<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/VIDEO_ID" ' +
'title="YouTube video player" allowfullscreen></iframe>';
</script>
Cookie Consent is free and needs no account. Build your free consent banner with TermsFeed Free Cookie Consent.
Add YouTube to TermsFeed Privacy Consent
Add YouTube from its template in TermsFeed Privacy Consent, and each video shows a consent placeholder until the visitor accepts YouTube. Replace each YouTube <iframe> with the replaceable tag of the template, which loads the video from www.youtube-nocookie.com once the visitor accepts.
The YouTube template asks for no ID and fills every field of the vendor. Pick the "YouTube" card under Functionality and click "Add YouTube". The illustration shows the template form in the TermsFeed app.
Privacy Consent detects the location of each visitor and records every answer in a consent log. Set up YouTube from its template with TermsFeed Privacy Consent.
Follow every step, the vendor settings, and the check in Chrome DevTools in how to block the YSC cookie.
Who Runs YouTube
Google LLC runs YouTube from the United States, and Google Ireland Limited provides Google services to users in the European Economic Area (EEA) and Switzerland. The YouTube embed player loads from the servers of Google, so every YouTube cookie on your pages belongs to a domain of Google.
Read how Google LLC handles the data in the YouTube privacy policy. Both documents appear in the sources at the end of this page.
YouTube Cookie FAQs
Does YouTube need consent?
Yes, the YouTube cookies need consent in the EU and the UK, and need no prior opt-in in California. Firstly, the ePrivacy Directive requires consent before a site sets the functionality cookies of YouTube. Secondly, the UK PECR requires consent before a site sets the functionality cookies of YouTube. Thirdly, the CCPA sets no general opt-in requirement for the functionality cookies of YouTube, and the table gives the opt-out right of visitors. The consent section of this page gives the table for each law.
How long do YouTube cookies last?
The cookies of YouTube last up to 180 days (6 months), and 1 cookie lasts for the browser session. A session cookie such as YSC has no expiry date, and the __Secure-ROLLOUT_TOKEN cookie lasts longest. The retention column of the cookie list gives the lifetime of each cookie.
How do I block YouTube cookies?
Block the YouTube cookies by holding back the script that inserts the YouTube player until the visitor accepts functionality cookies. Tag the script that inserts the YouTube player with data-cookie-consent="functionality" in TermsFeed Free Cookie Consent, or add YouTube as a vendor in TermsFeed Privacy Consent. The page of the YSC cookie gives the full steps and the settings of YouTube.
Sources for the YouTube Cookies
The facts on this page come from the documentation Google publishes, checked on 2026-10-17. The list gives every source, so you check each fact yourself.
- TermsFeed website auditor test of the YouTube player (internal)
- Google, How Google uses cookies
- YouTube Help, Embed videos and playlists (privacy-enhanced mode)
- MDN Web Docs, Cookies Having Independent Partitioned State (CHIPS)
- TermsFeed check of the response headers of www.youtube.com/embed and www.youtube-nocookie.com/embed, 17 October 2026 (internal)
- YouTube privacy policy