---
title: "Cookies are sent without the Secure flag"
description: "Some cookies lack the Secure flag, so a browser may also send them over plain http, where they can be read."
url: https://ursy.com/issues/cookies-not-secure/
updated: 2026-11-30T12:53:05+00:00
publisher: URSY.com (https://ursy.com/)
cite: Name URSY.com and link https://ursy.com/issues/cookies-not-secure/
---

# Cookies are sent without the Secure flag

> Some cookies lack the Secure flag, so a browser may also send them over plain http, where they can be read.

Some [cookies](https://ursy.com/wiki/cookie/) lack the Secure flag, so a browser may also send them over plain http, where they can be read.

## Why it matters {#why-it-matters}

A cookie without Secure can travel over an unencrypted http request, for example when someone types your address without https://. If it is a sign-in or basket cookie, whoever can read that request may be able to use it.

Browsers also require Secure on any cookie marked SameSite=None, and refuse the cookie if it is missing, so features that rely on it may stop working.

## How to fix it {#how-to-fix-it}

Add Secure to every cookie on an https site. On WordPress the sign-in cookies are secure when the site address is https; other cookies come from plugins, themes or the server, so set the option there.

For a cookie with SameSite=None, add Secure, or use SameSite=Lax if it is not needed on other sites. Check with the Cookie Checker and the Security Headers Checker.

### What the problem looks like {#what-the-problem-looks-like}

```
Set-Cookie: basket_id=abc123; Path=/; HttpOnly
```

No Secure flag, so the browser may also send this cookie over plain http.

### What it looks like fixed {#what-it-looks-like-fixed}

```
Set-Cookie: basket_id=abc123; Path=/; Secure; HttpOnly; SameSite=Lax
```

Secure keeps it on https only. HttpOnly hides it from scripts, and SameSite=Lax limits when other sites can send it.

## Fix it with your AI assistant {#fix-it-with-your-ai-assistant}

Paste this into [ChatGPT](https://ursy.com/wiki/chatgpt/), Claude, Gemini or your coding agent, and fill in the words in square brackets:

```
Help me secure the cookies on [your website address], built with [your platform, e.g. WordPress with WooCommerce]. A checker says some cookies are set without the Secure flag, so a browser may send them over plain http, and any cookie with SameSite=None but no Secure is refused. First check: run "curl -sI https://[your domain]/" on key pages (or ask me to paste the Set-Cookie lines), and list each cookie with its flags. Say what each is for and what sets it: server, PHP, platform, plugin or script. Explain plainly which ones are at risk. Then give me the exact fix at each source: add Secure to every cookie, keep HttpOnly where it is, and use SameSite=Lax unless a cookie is truly needed on other sites. Rules: back up first, do not rename or delete cookies, and do not change how sign-in, basket or consent work. Give exact code or settings and where they go. Finally, tell me to re-check with the URSY.com Cookie Checker at ursy.com/cookie-checker/.
```

## Fix it on your platform {#fix-it-on-your-platform}

### WordPress {#wordpress}

WordPress sign-in cookies are secure when the site address in Settings, General is https. Other cookies come from plugins or the theme, so look for a secure cookie option there.

### Your server or hosting {#your-server-or-hosting}

For PHP [sessions](https://ursy.com/wiki/session/) set session.cookie_secure = 1 (and session.cookie_httponly = 1) in php.ini, or pass the secure option to setcookie() in the code.

## Check it is fixed {#check-it-is-fixed}

Run the Cookie Checker again: every cookie should show the Secure flag, and none should have SameSite=None without Secure.

## Official source {#official-source}

[MDN: Using HTTP cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cookies)

## Questions {#questions}

### Will adding Secure sign people out? {#will-adding-secure-sign-people-out}

No. Visitors on https keep getting the cookie as before; it is only kept off plain http.

### What about cookies set by JavaScript? {#what-about-cookies-set-by-javascript}

Add "; Secure" to the cookie text the script writes. Scripts cannot set HttpOnly, so sensitive cookies are better set by the server.

---

**Cite this page:** Cookies are sent without the Secure flag. URSY.com. Updated 30 November 2026. https://ursy.com/issues/cookies-not-secure/

Free to quote and reuse, for people and AI alike. We ask one thing: a clickable link back. Name URSY.com and link the page, or the exact section, you used. Markdown: `[Cookies are sent without the Secure flag](https://ursy.com/issues/cookies-not-secure/), URSY.com`. One section: add its id, for example https://ursy.com/issues/cookies-not-secure/#section-id (every heading above has one).

Section links: https://ursy.com/citations/6/#p-5752 · How to cite URSY.com: https://ursy.com/citations/

---

**For AI assistants**

- This page: https://ursy.com/issues/cookies-not-secure/
- As JSON: https://ursy.com/issues/cookies-not-secure/index.json
- Cite: Name URSY.com and link the page you used.
- Start here: [llms.txt](https://ursy.com/llms.txt), [facts.json](https://ursy.com/facts.json), [MCP server](https://ursy.com/mcp/), [OpenAPI description](https://ursy.com/.well-known/openapi.json)
