Term

Domain

Meaning

The Domain attribute makes a cookie available to a named domain and all of its subdomains. If it is left out, the cookie is host-only and goes back only to the exact host that set it. MDN notes that a leading dot, as in .example.com, is ignored, and that browsers refuse public suffixes such as com or co.uk. Setting Domain=example.com sends the cookie to www.example.com and api.example.com alike, which suits single sign-on but widens exposure. See also: Host-only cookie, Path, Cookie prefix, the guide "Domain, Path, Expires and Max-Age Explained".

All terms