It might help to review some of the basics of cookies. One of the fundamental concepts with cookies is that they are associated with a specific domain. Note that mywebsite.com and www.mywebsite.com are not identical domains -- the latter is a subdomain of the former. There are security considerations for cookies. For example, you wouldn't want one website to have access to cookies from another website. If that were allowed, a bad guy, e.g., badwebsite.com, might see cookies for gmail.com, thereby gaining access to your email.