Docs Security

Cookies set securely

Checks that cookies set by your homepage use the Secure flag, and that session and login cookies also use HttpOnly.

SecurityWeight 2In reports as cookie-flags

What it checks

We read every Set-Cookie header on the final homepage response. A cookie is flagged when it has no Secure attribute, or when its name contains sess, auth, token, sid or login and it has no HttpOnly attribute.

Only cookies sent by the server on the homepage are seen. Cookies created by JavaScript in the browser, and cookies set on other pages such as a login page, are not checked. SameSite is not checked.

Why it matters

A cookie without Secure can be sent over plain HTTP, where anyone on the network can read it. A session cookie without HttpOnly can be read by any script on the page, so an injected script could steal a logged-in session.

How to fix it

Set the flags where each cookie is created: in your app code, your framework's session settings, or your server config. For session and login cookies, add HttpOnly as well, and SameSite=Lax is a sensible default.

If a cookie comes from a plugin, app or third-party tool, check its settings or update it. The cookie name in your report usually tells you which tool sets it.

Platform notes

WordPress

Cookies on the public homepage usually come from plugins, such as consent, caching, analytics or shop plugins, rather than WordPress itself. Update or configure the plugin that sets the flagged cookie.

Nginx and Apache

PHP session cookies follow the session.cookie_secure and session.cookie_httponly settings in php.ini.

Next.js, Vercel and Netlify

When you set cookies in route handlers, middleware or server actions, pass secure and httpOnly in the cookie options.

Shopify, Wix, Squarespace and Webflow

Cookies set by the platform itself are outside your control. Flagged cookies from custom code or apps can be fixed in those tools.

Your report shows what this check found on your site. Pro shows the exact fix for your site. See pricing.

See what this check finds on your site

Free, about 30 seconds, with every other check included.