{
    "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/",
    "canonical": "https://ursy.com/issues/cookies-not-secure/",
    "markdown": "https://ursy.com/issues/cookies-not-secure/index.md",
    "json": "https://ursy.com/issues/cookies-not-secure/index.json",
    "published": "2026-11-29T21:57:25+00:00",
    "updated": "2026-11-30T12:53:05+00:00",
    "language": "en-GB",
    "publisher": {
        "name": "URSY.com",
        "url": "https://ursy.com/"
    },
    "cite": "Name URSY.com and link https://ursy.com/issues/cookies-not-secure/",
    "start_here": {
        "page": "https://ursy.com/issues/cookies-not-secure/",
        "markdown": "https://ursy.com/issues/cookies-not-secure/index.md",
        "json": "https://ursy.com/issues/cookies-not-secure/index.json",
        "cite": "Name URSY.com and link the page you used.",
        "doors": {
            "llms_txt": "https://ursy.com/llms.txt",
            "facts": "https://ursy.com/facts.json",
            "mcp": "https://ursy.com/mcp/",
            "openapi": "https://ursy.com/.well-known/openapi.json"
        }
    },
    "issue": {
        "slug": "cookies-not-secure",
        "problem": "Cookies are sent without the Secure flag",
        "summary": "Some cookies lack the Secure flag, so a browser may also send them over plain http, where they can be read.",
        "status": "Live",
        "priority": "medium",
        "category": "security",
        "category_title": "Security and HTTPS",
        "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": [
            "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."
        ],
        "steps": [],
        "check_it_is_fixed": "Run the Cookie Checker again: every cookie should show the Secure flag, and none should have SameSite=None without Secure.",
        "found_by": [
            {
                "tool": "cookie-checker",
                "name": "Cookie Checker",
                "status": "Live",
                "page": "https://ursy.com/cookie-checker/",
                "card": "https://ursy.com/cookie-checker.json"
            },
            {
                "tool": "security-headers-checker",
                "name": "Security Headers Checker",
                "status": "Live",
                "page": "https://ursy.com/security-headers-checker/",
                "card": "https://ursy.com/security-headers-checker.json"
            }
        ],
        "full_record": "https://ursy.com/wp-json/ursy/v1/issues/cookies-not-secure",
        "source": {
            "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cookies",
            "title": "MDN: Using HTTP cookies"
        },
        "cite": "Cookies are sent without the Secure flag. URSY.com. https://ursy.com/issues/cookies-not-secure/"
    },
    "headings": [
        {
            "level": 2,
            "text": "Why it matters",
            "id": "why-it-matters",
            "url": "https://ursy.com/issues/cookies-not-secure/#why-it-matters"
        },
        {
            "level": 2,
            "text": "How to fix it",
            "id": "how-to-fix-it",
            "url": "https://ursy.com/issues/cookies-not-secure/#how-to-fix-it"
        },
        {
            "level": 3,
            "text": "What the problem looks like",
            "id": "what-the-problem-looks-like",
            "url": "https://ursy.com/issues/cookies-not-secure/#what-the-problem-looks-like"
        },
        {
            "level": 3,
            "text": "What it looks like fixed",
            "id": "what-it-looks-like-fixed",
            "url": "https://ursy.com/issues/cookies-not-secure/#what-it-looks-like-fixed"
        },
        {
            "level": 2,
            "text": "Fix it with your AI assistant",
            "id": "fix-it-with-your-ai-assistant",
            "url": "https://ursy.com/issues/cookies-not-secure/#fix-it-with-your-ai-assistant"
        },
        {
            "level": 2,
            "text": "Fix it on your platform",
            "id": "fix-it-on-your-platform",
            "url": "https://ursy.com/issues/cookies-not-secure/#fix-it-on-your-platform"
        },
        {
            "level": 3,
            "text": "WordPress",
            "id": "wordpress",
            "url": "https://ursy.com/issues/cookies-not-secure/#wordpress"
        },
        {
            "level": 3,
            "text": "Your server or hosting",
            "id": "your-server-or-hosting",
            "url": "https://ursy.com/issues/cookies-not-secure/#your-server-or-hosting"
        },
        {
            "level": 2,
            "text": "Check it is fixed",
            "id": "check-it-is-fixed",
            "url": "https://ursy.com/issues/cookies-not-secure/#check-it-is-fixed"
        },
        {
            "level": 2,
            "text": "Official source",
            "id": "official-source",
            "url": "https://ursy.com/issues/cookies-not-secure/#official-source"
        },
        {
            "level": 2,
            "text": "Questions",
            "id": "questions",
            "url": "https://ursy.com/issues/cookies-not-secure/#questions"
        },
        {
            "level": 3,
            "text": "Will adding Secure sign people out?",
            "id": "will-adding-secure-sign-people-out",
            "url": "https://ursy.com/issues/cookies-not-secure/#will-adding-secure-sign-people-out"
        },
        {
            "level": 3,
            "text": "What about cookies set by JavaScript?",
            "id": "what-about-cookies-set-by-javascript",
            "url": "https://ursy.com/issues/cookies-not-secure/#what-about-cookies-set-by-javascript"
        }
    ],
    "links": [
        {
            "text": "cookies",
            "url": "https://ursy.com/wiki/cookie/",
            "internal": true
        },
        {
            "text": "ChatGPT",
            "url": "https://ursy.com/wiki/chatgpt/",
            "internal": true
        },
        {
            "text": "sessions",
            "url": "https://ursy.com/wiki/session/",
            "internal": true
        },
        {
            "text": "MDN: Using HTTP cookies",
            "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cookies",
            "internal": false
        }
    ],
    "words": 563,
    "text": "Some cookies lack the Secure flag, so a browser may also send them over plain http, where they can be read. 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 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 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 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 Paste this into 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 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 For PHP sessions 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 Run the Cookie Checker again: every cookie should show the Secure flag, and none should have SameSite=None without Secure. Official source MDN: Using HTTP cookies Questions 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? Add \"; Secure\" to the cookie text the script writes. Scripts cannot set HttpOnly, so sensitive cookies are better set by the server.",
    "source": "https://ursy.com/issues/cookies-not-secure/"
}