# Why Is My Cookie Not Being Sent?

> A step-by-step checklist for cookies missing from HTTP requests: Domain, Path, Secure, SameSite, fetch credentials, CORS, expiry and browser blocking.

Source: https://howhttpworks.com/debug/cookie-not-sent
Last reviewed: 2026-11-06

Error messages this page covers:
- `This attempt to set a cookie via a Set-Cookie header was blocked because it had the "SameSite=None" attribute but did not have the "Secure" attribute, which is required in order to use "SameSite=None".`
- `This cookie was blocked because it had the "SameSite=Lax" attribute and the request was made from a different site and was not initiated by a top-level navigation.`
- `Cookie “session” has been rejected because it is in a cross-site context and its “SameSite” is “Lax” or “Strict”.`

> **TL;DR:** A missing `Cookie` header means the browser rejected the cookie when it was set, decided the request is outside the cookie's scope, or withheld credentials. Check in order: was it stored, do Domain, Path and Secure match the URL, is the request cross-site for SameSite, and does a cross-origin `fetch` send `credentials: 'include'`?

## 1. Confirm the browser stored the cookie

Start with the response that creates the cookie. In DevTools, open Network, select that response and read its `Set-Cookie` header, then look in the Application (Chrome) or Storage (Firefox) panel. A cookie that never reached the cookie store cannot appear on a later request.

```bash
curl -i https://api.example.com/session
```

```http
HTTP/2 200
Set-Cookie: session=abc123; Path=/; Secure; HttpOnly; SameSite=Lax
```

Browsers show a warning next to a rejected `Set-Cookie` header. Common reasons are an invalid `Domain`, `SameSite=None` without `Secure`, a malformed attribute, or a third-party cookie policy.

## 2. Match Domain, Path and Secure to the request URL

A stored cookie is sent only when every scope rule matches the destination URL:

- **Domain:** a host-only cookie set by `api.example.com` is not sent to `www.example.com`. A valid `Domain=example.com` cookie covers subdomains.
- **Path:** `Path=/account` matches `/account/profile` but not `/api/profile`.
- **Secure:** a `Secure` cookie is sent only over HTTPS. Browsers special-case `localhost` during development, so test production behavior over HTTPS.

Do not widen Domain or Path just to make a test pass. Use the narrowest scope that covers the endpoints that need the cookie.

## 3. Determine whether the request is cross-site

SameSite compares the registrable site and scheme, not the full origin. `app.example.com` and `api.example.com` are cross-origin but same-site; a request from a page on `customer.example` to `api.example.com` is cross-site.

| SameSite value | Typical behavior |
| --- | --- |
| `Strict` | Withheld on every cross-site request, including top-level navigations |
| `Lax` (Chrome treats unset as Lax) | Withheld on cross-site subrequests, sent on top-level GET navigations |
| `None; Secure` | Eligible for cross-site use, subject to the browser's third-party cookie policy |

## 4. Include credentials on cross-origin fetch requests

`fetch` uses `same-origin` credentials by default. When the API is on another origin, opt in:

```javascript
const response = await fetch('https://api.example.com/me', {
  credentials: 'include'
})
```

The API response must allow it:

```http
Access-Control-Allow-Origin: https://app.example.com
Access-Control-Allow-Credentials: true
Vary: Origin
```

Credentialed requests cannot use `Access-Control-Allow-Origin: *`. When the request needs a preflight, the preflight and the actual response must both pass. The [CORS Debugger](https://howhttpworks.com/tools/cors-debugger) and the [failed preflight checklist](https://howhttpworks.com/debug/cors-preflight) isolate that part.

## 5. Check lifetime, prefixes and browser policy

- `Expires` must be in the future and `Max-Age` greater than zero.
- `__Host-` cookies need `Secure`, no `Domain` attribute and `Path=/`.
- `__Secure-` cookies need `Secure` and must be set from an HTTPS page.
- Private browsing, storage limits, user settings and third-party cookie restrictions can reject or partition cookies.
- A proxy or framework can rewrite or drop `Set-Cookie`. Compare the origin's response with what reaches the browser.

Once you find the rule that fails, generate a corrected header with the [Set-Cookie Builder](https://howhttpworks.com/tools/cookie-builder) and verify it in a fresh browser session.
