Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm baking a cookies.txt file for use with some wget scripts and can't find a lot of detailed information. Currently, I'm trying to determine the difference between "domain.tld"-style cookies and ".domain.tld"-style cookies (with and without leading dot).

I've pulled a bunch of cookies from Firefox's database and there doesn't seem to be any consistency, even within the same domain. For example, this very site sets a cookie named "user" for the domain "" and another called "__qca" for the domain "".

What is the significance of the leading dot? Is it perhaps related to the "can be read by other machines at the same domain" column in cookies.txt?

share|improve this question
up vote 3 down vote accepted

If it is set as "", then "" will get the cookie, but if it is set as "" then "" does not get it.

You can read all the gory details of this in RFC 2109

share|improve this answer
I think I see where I was confused; I was focused on the "domains must start with a dot" part of the spec, but if the ";domain=" part of the Set-Cookie header is left off completely, you get a no-leading-dot hostname. Thanks! – Ben Blank Jul 29 '09 at 0:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.