Secure Cookies
A secure cookie is a browser cookie that carries a special setting, called the Secure attribute, telling the browser to send it only over encrypted HTTPS connections. This helps prevent the cookie from being read by unauthorized parties if it were sent as plain, unencrypted text. It is a technical safeguard for how a cookie travels between the browser and the server, and is separate from questions of whether the cookie itself is permitted or requires consent.
A secure cookie is an HTTP cookie that has the Secure attribute set, which limits the scope of the cookie to encrypted channels. When the attribute is present, a compliant browser transmits the cookie to the server only over HTTPS and does not include it in requests sent over unencrypted (HTTP) connections, reducing the risk of interception in transit. The Secure attribute is a transport-layer confidentiality control and is typically applied alongside related attributes such as HttpOnly and SameSite, which address different threats. It governs only how a cookie is transmitted and does not, on its own, address whether placing or reading the cookie is lawful or requires user consent under applicable frameworks such as the ePrivacy rules or the GDPR; those obligations must be assessed separately and are out of scope for this definition.
Why it matters
Cookies frequently carry session identifiers, authentication tokens, and other values that, if intercepted, could allow an unauthorized party to impersonate a user or gain access to an account. When a cookie is transmitted over an unencrypted HTTP connection, its contents travel as plain text and can, in principle, be observed by parties positioned on the network path. The Secure attribute mitigates this specific risk by instructing compliant browsers to send the cookie only over encrypted HTTPS connections, so it is not exposed on unsecured channels. For teams responsible for the confidentiality and integrity of user sessions, applying this attribute is a foundational technical control.
Who it's relevant to
Inside Secure Cookies
Common questions
Answers to the questions practitioners most commonly ask about Secure Cookies.

