I've found that recently when I visit YouTube, I am automatically logged in with my Google/Gmail Account. I don't like this at all. I do not want my video browsing history tied up with my Google account.

I've disabled third-party cookies in Firefox, but this still happens.

  1. Log into Gmail.com
  2. Visit YouTube.com. Shows my username as my Gmail screen name
  3. Logout on Youtube.com
  4. Go back to Gmail, logged out there also.

How can I adjust my Firefox settings to avoid this?

  • 1
    edit: I am aware Google and YouTube are owned by the same parent company. My question is about how they are able to share information across domains and how I can block this in Firefox.
    – user13137
    Dec 10, 2011 at 20:49
  • I moved my comment to an answer, because, well, it's an answer. :) I don't think you can choose to block how people who wrote those cookie use them, aside from deleting them. But maybe other's have some ideas.
    – techie007
    Dec 10, 2011 at 20:52
  • 1
    i know i don't have control over how cookies are used by the site who wrote them. what i don't understand is how another domain can read them. especially when third-party cookies are disabled explicitly in my settings.
    – user13137
    Dec 10, 2011 at 20:55
  • See Manoel's answer below. I just tested it and it works.
    – Alex
    Jan 28, 2012 at 21:07

5 Answers 5


I havn't checked the method (and it currently doesn't happen for me, btw. - I'm logged in on GMail, but logged out on YouTube). But third-party cookies aren't necessarily what is happening here. There are other ways, similar to the way OpenID authentication works, or the way Wikipedia (probably) logs you into all of Wikimedia.

Say youtube.com embeds an image google.com/authenticate?id=uniqueid&domain=youtube.com, then gets a Google-internal callback with your Google identity, to log you in. Or the other way round: when you log into Google, they load an image from YouTube - say youtube.com/authenticate?id=uniqueid&source=google.com, then do an internal callback with the unqiue session ID to retrieve your authentication data and set another regular cookie on the youtube.com domain.

I don't think you will be able to block this easily, not unless installing a proxy filter that e.g. disables all cookies from youtube.com; using "incognito" mode, or essentially rejecting all cookies from youtube.com in the browser (in the blocked list).

  • 2
    This is correct. No cookies are used. The two sites are under common administration and share information with each other through a "back door" that doesn't involve your browser.
    – David Schwartz
    Dec 11, 2011 at 0:28

To avoid this, follow this instruction:

add ||*.google.*^$domain=~google.com|~ to your AdBlockPlus filters, so that youtube.com cannot get data from google.com.

I think you could also detach your YouTube account from your Google account.

  • 1
    "I think you could also detach your YouTube account from your Google account.". If you created your Youtube account after may 2009, you can't unlink your google account & youtube. You can't even change it. If you want to separate youtube & gmail, you'll need to create two separate google accounts (and start over with youtube, reupload videos, etc).
    – Julien N
    Dec 12, 2011 at 17:14

I guess that the easiest solution (but also the worse if you have some content on your YouTube account) is to create another YouTube account linked to a new Google profile that you use only for YouTube. If you look on the Google forums & FAQs, this is the "official" "recommanded" solution to dissociate accounts.

Then you'll be able to be logged on Gmail without being logged on YouTube.
This is not an acceptable solution, I know, so you may have to use some tricks to achieve that.


Don't use the log out!

Go into the YouTube's account management (Your User -> Settings -> Manage Account) and look for the option that says Sign out of all YouTube Sessions. Click on the Sign Out Everywhere link. It will shutdown your YouTube session without logging you out from Gmail.

enter image description here

  • -1: This answer is obsolete.
    – Rubén
    Sep 30, 2015 at 23:03

It could be done with third party cookies (see http://en.wikipedia.org/wiki/HTTP_cookie#Third-party_cookie). To find out how it is done exactly, you could clean all cookies and watch the traffic with wireshark or tcpdump.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy