# Check your cookie security flags Secure, HttpOnly and SameSite.

> Check the cookies your homepage sets for the Secure, HttpOnly and SameSite flags, with sign-in cookies first and the exact Set-Cookie line to use.

Source: https://scandefend.com/checks/cookies

Cookie check

Runs in every scan · 4 checks

Make sure the cookies that keep visitors signed in are set safely, with the exact line to fix any that aren't.

-   No card for the free check
-   Results usually in minutes
-   $8 for 1 check, $18 for 5, $59 for 20 (+ applicable tax)
-   No subscription needed
-   [View sample report](https://scandefend.com/sample-report?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies)

The short answer

Three small cookie settings do a lot of work: Secure keeps a cookie on HTTPS, HttpOnly hides it from page scripts, and SameSite limits when other sites can send it along. We read the cookies your homepage sets, check each flag is present, and put sign-in cookies first.

[See a sample report](https://scandefend.com/sample-report?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies) [All checks](https://scandefend.com/checks?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies)

What we check

## What we look at. Evidence and plain-English fixes.

Part of every Quick Scan, alongside [the other checks](https://scandefend.com/checks?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies).

-   ### Secure

    Cookies only travel over HTTPS.

-   ### HttpOnly

    Page scripts can't read them, unless they need to.

-   ### SameSite

    A SameSite attribute is set on each cookie.

-   ### Sign-in cookies first

    Cookies that look like session cookies are ranked higher.

Why it matters

## Small settings. A big difference for your visitors.

-   ### Sessions stay private

    Even on public Wi-Fi.

-   ### Scripts can't lift them

    HttpOnly keeps sign-in cookies out of reach.

-   ### Minutes to fix

    Usually one setting in your platform.

What a finding looks like

## Plain English. With the evidence behind it.

[Open the full sample report](https://scandefend.com/sample-report?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies)

F2 · cookie-flags

### Protect the session cookie

Medium Confirmed Minutes

What it means

Your homepage sets a session cookie without the Secure and HttpOnly flags. Secure keeps it on encrypted connections; HttpOnly keeps it away from scripts in the page, so an injected script can't read it.

Evidence

```
Set-Cookie: PHPSESSID=…; path=/
              ↑ no Secure, no HttpOnly
```

Expected

`Set-Cookie: PHPSESSID=…; path=/; Secure; HttpOnly; SameSite=Lax`

Fix

Add the Secure and HttpOnly flags (and SameSite=Lax) to session cookies. In PHP: session.cookie\_secure = 1 and session.cookie\_httponly = 1.

How to fix it

## A few clear steps. In the order to take them.

Your report has the exact fix for your site, ready to forward to whoever looks after it.

1.  Find the cookie settings in your platform or framework. Most have a single switch for each flag.

2.  Add Secure and HttpOnly to sign-in and session cookies, and SameSite=Lax (or Strict).

3.  Run another check to confirm the new settings are live.

A well-set session cookie

```
Set-Cookie: session=…; Path=/; Secure; HttpOnly; SameSite=Lax
```

Questions

## Cookie security questions.

Something else? [support@scandefend.com](mailto:support@scandefend.com)

**What do Secure, HttpOnly and SameSite do?**

Secure means the cookie is only sent over HTTPS. HttpOnly hides it from JavaScript on the page. SameSite controls whether other sites can make the browser send it along with their requests. Together they keep sign-in cookies private.

**Should I use SameSite=Lax or Strict?**

Lax suits most sites: the cookie is still sent when someone follows a link to you. Strict is tighter but can sign people out when they arrive from another site.

**Do you check cookies set after login?**

A Quick Scan reads the cookies your homepage sets. Cookies that only appear after signing in sit outside its scope, and the report says so.

**Is this about cookie consent banners?**

No. This check is about how cookies are protected, not about consent. Both matter; they're separate jobs.

Keep exploring

## Related checks. All part of the same Quick Scan.

-   [8 checks Security headers HSTS, CSP and the other browser protections your site turns on.](https://scandefend.com/check-security-headers?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies)
-   [7 checks HTTPS and HSTS Every visit lands on a secure connection, and stays there.](https://scandefend.com/checks/https?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies)
-   [7 checks Exposed keys Secret keys and internal details left in public code.](https://scandefend.com/checks/exposed-secrets?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies)

Also useful: [What we check](https://scandefend.com/checks?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies) [Sample report](https://scandefend.com/sample-report?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies) [Pricing](https://scandefend.com/pricing?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies) [For developers](https://scandefend.com/for/developers?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies)

## See what your website shows. Know what to fix first.

[See pricing](https://scandefend.com/pricing?utm_source=ai&utm_medium=referral&utm_campaign=ai-md&utm_content=checks-cookies)

Every Quick Scan 11 areas

-   HTTPS and redirects
-   Encryption (TLS) test
-   Security headers
-   Email security
-   Outdated software and plugins
-   Known vulnerabilities
-   Cookie security
-   Google blocklist
-   Exposed keys
-   Exposed files (verified sites)
-   DNS health

One report, with plain-English fixes

These are the USD list prices; the website shows each visitor prices in their own local currency, which vary by country.
