SiteAlertAI SiteAlertAI
๐Ÿ›ฐ Web Scan ๐Ÿ”’ SSL/TLS ๐Ÿ“ฌ MX Record โœ‰ Email Header ๐ŸŽฃ URL Check ๐ŸŒ IP Geo
๐Ÿ›ฐ Web Scan ๐Ÿ”’ SSL/TLS ๐Ÿ“ฌ MX Record โœ‰ Email Header ๐ŸŽฃ URL Check ๐ŸŒ IP Geo
โ† All articles
Web Security 2026-02-15 ยท 5 min read

Cookie Security: Secure, HttpOnly and SameSite Explained

Cookies often carry session tokens โ€” the keys to a logged-in account. Three flags decide how safely those keys are handled, and missing them is one of the most common findings in a web scan.

The three flags

  • Secure โ€” the cookie is only ever sent over HTTPS, so it cannot leak over an unencrypted connection.
  • HttpOnly โ€” JavaScript cannot read the cookie, which blocks token theft via cross-site scripting (XSS).
  • SameSite โ€” controls whether the cookie is sent on cross-site requests. Lax or Strict defends against cross-site request forgery (CSRF).

Recommended setup

For session cookies, set all three: Set-Cookie: session=...; Secure; HttpOnly; SameSite=Lax; Path=/. Use SameSite=Strict for the most sensitive cookies, and never expose a session token to JavaScript. Run the web scan to see which of your cookies are missing these flags.

Put this into practice
Run a free, private scan โ€” no login, nothing stored.
๐Ÿ›ก Web Scan ๐Ÿ”’ SSL/TLS ๐Ÿ“ฌ MX & Email ๐ŸŽฃ URL Check

Related articles

Web Security What Is a Web Application Firewall (WAF) and Do You Need One? A WAF filters malicious traffic before it reaches your app. Learn what it catches, what it does not, and when it is worth it. Web Security Open Ports: What They Reveal and Which Ones to Close Every open port is a potential door. Here is how to think about port exposure and reduce your attack surface. Web Security CVEs and Outdated Software: Why Version Numbers Matter A known vulnerability in an unpatched server is the easiest way in for attackers. Here is how CVEs work and how to stay ahead.
SiteAlertAI · © 2026 All rights reserved · Built for security professionals and developers.
Blog Guides Privacy Terms About Contact Social

⚠ For authorised security testing only. Scanning domains you do not own may violate laws in your jurisdiction. SiteAlertAI accepts no liability for misuse. CVE data is indicative โ€” verify with NVD.