{
    "title": "No Strict-Transport-Security (HSTS) header",
    "description": "Without HSTS, a visitor's first request can go over plain http before your redirect, where it can be read or changed.",
    "url": "https://ursy.com/issues/hsts-missing/",
    "canonical": "https://ursy.com/issues/hsts-missing/",
    "markdown": "https://ursy.com/issues/hsts-missing/index.md",
    "json": "https://ursy.com/issues/hsts-missing/index.json",
    "published": "2026-11-29T21:57:25+00:00",
    "updated": "2026-11-30T12:53:04+00:00",
    "language": "en-GB",
    "publisher": {
        "name": "URSY.com",
        "url": "https://ursy.com/"
    },
    "cite": "Name URSY.com and link https://ursy.com/issues/hsts-missing/",
    "start_here": {
        "page": "https://ursy.com/issues/hsts-missing/",
        "markdown": "https://ursy.com/issues/hsts-missing/index.md",
        "json": "https://ursy.com/issues/hsts-missing/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": "hsts-missing",
        "problem": "No Strict-Transport-Security (HSTS) header",
        "summary": "Without HSTS, a visitor's first request can go over plain http before your redirect, where it can be read or changed.",
        "status": "Live",
        "priority": "medium",
        "category": "security",
        "category_title": "Security and HTTPS",
        "why_it_matters": [
            "Strict-Transport-Security tells browsers to use only https for your site and to upgrade any later http visit themselves, before anything is sent. Without it, a visitor who types your address without https:// first asks over plain http, and that request can be intercepted.",
            "Browsers ignore the header when it arrives over http, so it only works once the site runs fully on https."
        ],
        "how_to_fix": [
            "Once every page works on https, send \"Strict-Transport-Security: max-age=31536000\" (one year) on https answers. Add includeSubDomains only when every subdomain works on https too.",
            "Most hosts, CDNs and security plugins have a setting for it. Check it with the Security Headers Checker."
        ],
        "steps": [],
        "check_it_is_fixed": "Run the Security Headers Checker again: it should find one Strict-Transport-Security header with a max-age of at least a year once you have finished testing.",
        "found_by": [
            {
                "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"
            },
            {
                "tool": "ssl-checker",
                "name": "SSL Certificate Checker",
                "status": "Live",
                "page": "https://ursy.com/ssl-checker/",
                "card": "https://ursy.com/ssl-checker.json"
            },
            {
                "tool": "http-header-checker",
                "name": "HTTP Header Checker",
                "status": "Live",
                "page": "https://ursy.com/http-header-checker/",
                "card": "https://ursy.com/http-header-checker.json"
            }
        ],
        "full_record": "https://ursy.com/wp-json/ursy/v1/issues/hsts-missing",
        "source": {
            "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Strict-Transport-Security",
            "title": "MDN: Strict-Transport-Security"
        },
        "cite": "No Strict-Transport-Security (HSTS) header. URSY.com. https://ursy.com/issues/hsts-missing/"
    },
    "headings": [
        {
            "level": 2,
            "text": "Why it matters",
            "id": "why-it-matters",
            "url": "https://ursy.com/issues/hsts-missing/#why-it-matters"
        },
        {
            "level": 2,
            "text": "How to fix it",
            "id": "how-to-fix-it",
            "url": "https://ursy.com/issues/hsts-missing/#how-to-fix-it"
        },
        {
            "level": 3,
            "text": "What the problem looks like",
            "id": "what-the-problem-looks-like",
            "url": "https://ursy.com/issues/hsts-missing/#what-the-problem-looks-like"
        },
        {
            "level": 3,
            "text": "What it looks like fixed",
            "id": "what-it-looks-like-fixed",
            "url": "https://ursy.com/issues/hsts-missing/#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/hsts-missing/#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/hsts-missing/#fix-it-on-your-platform"
        },
        {
            "level": 3,
            "text": "WordPress",
            "id": "wordpress",
            "url": "https://ursy.com/issues/hsts-missing/#wordpress"
        },
        {
            "level": 3,
            "text": "Your server or hosting",
            "id": "your-server-or-hosting",
            "url": "https://ursy.com/issues/hsts-missing/#your-server-or-hosting"
        },
        {
            "level": 3,
            "text": "Your CDN (for example Cloudflare)",
            "id": "your-cdn-for-example-cloudflare",
            "url": "https://ursy.com/issues/hsts-missing/#your-cdn-for-example-cloudflare"
        },
        {
            "level": 2,
            "text": "Check it is fixed",
            "id": "check-it-is-fixed",
            "url": "https://ursy.com/issues/hsts-missing/#check-it-is-fixed"
        },
        {
            "level": 2,
            "text": "Official source",
            "id": "official-source",
            "url": "https://ursy.com/issues/hsts-missing/#official-source"
        },
        {
            "level": 2,
            "text": "Questions",
            "id": "questions",
            "url": "https://ursy.com/issues/hsts-missing/#questions"
        },
        {
            "level": 3,
            "text": "Can HSTS lock visitors out?",
            "id": "can-hsts-lock-visitors-out",
            "url": "https://ursy.com/issues/hsts-missing/#can-hsts-lock-visitors-out"
        },
        {
            "level": 3,
            "text": "Should I ask for preload straight away?",
            "id": "should-i-ask-for-preload-straight-away",
            "url": "https://ursy.com/issues/hsts-missing/#should-i-ask-for-preload-straight-away"
        }
    ],
    "links": [
        {
            "text": "redirect",
            "url": "https://ursy.com/wiki/redirect/",
            "internal": true
        },
        {
            "text": "subdomain",
            "url": "https://ursy.com/wiki/subdomain/",
            "internal": true
        },
        {
            "text": "ChatGPT",
            "url": "https://ursy.com/wiki/chatgpt/",
            "internal": true
        },
        {
            "text": "MDN: Strict-Transport-Security",
            "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Strict-Transport-Security",
            "internal": false
        },
        {
            "text": "Preload",
            "url": "https://ursy.com/wiki/preload/",
            "internal": true
        }
    ],
    "words": 565,
    "text": "Without HSTS, a visitor's first request can go over plain http before your redirect, where it can be read or changed. Why it matters Strict-Transport-Security tells browsers to use only https for your site and to upgrade any later http visit themselves, before anything is sent. Without it, a visitor who types your address without https:// first asks over plain http, and that request can be intercepted. Browsers ignore the header when it arrives over http, so it only works once the site runs fully on https. How to fix it Once every page works on https, send \"Strict-Transport-Security: max-age=31536000\" (one year) on https answers. Add includeSubDomains only when every subdomain works on https too. Most hosts, CDNs and security plugins have a setting for it. Check it with the Security Headers Checker. What the problem looks like HTTP/2 200 content-type: text/html; charset=UTF-8 x-content-type-options: nosniff An https answer with no Strict-Transport-Security header. What it looks like fixed HTTP/2 200 content-type: text/html; charset=UTF-8 x-content-type-options: nosniff strict-transport-security: max-age=31536000 One year of HSTS. Add includeSubDomains only when every subdomain works on https. 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 add HSTS to [your website address], which runs on [your platform or server, e.g. WordPress on Apache, nginx, or Cloudflare in front]. A checker says https answers have no Strict-Transport-Security header, so a first visit over plain http can be intercepted before my redirect. First check: run \"curl -sI https://[your domain]/\" (or ask me to paste the headers) and confirm there is no HSTS header and none sent twice. Also ask me whether every page, and every subdomain, works on https. Explain what you found in plain words. Then add one header on https answers only: start with \"max-age=300\" to test, then raise it to \"max-age=31536000\". Rules: back up configuration files first, do not add includeSubDomains or preload unless I confirm every subdomain is on https, add it in one place only, and keep all other headers and redirects. Give the exact line, the file or setting it goes in, and how to reload. Finally, tell me to re-check with the URSY.com Security Headers Checker at ursy.com/security-headers-checker/. Fix it on your platform WordPress Many security plugins have an HSTS option. On Apache hosting you can also add Header always set Strict-Transport-Security \"max-age=31536000\" to .htaccess, with mod_headers on. Your server or hosting On nginx, add add_header Strict-Transport-Security \"max-age=31536000\" always; to the https server block only. On Apache, use Header always set in the https virtual host. Your CDN (for example Cloudflare) Cloudflare has an HSTS setting under SSL/TLS, Edge Certificates. Use it or the server, not both. Check it is fixed Run the Security Headers Checker again: it should find one Strict-Transport-Security header with a max-age of at least a year once you have finished testing. Official source MDN: Strict-Transport-Security Questions Can HSTS lock visitors out? If https breaks while browsers remember the rule, visitors cannot click past the warning until you fix it. Keep certificate renewal automatic, and start with a short max-age. Should I ask for preload straight away? No. Preload is hard to undo and covers every subdomain. Run plain HSTS for a while first, and preload only when you are sure the whole domain stays on https.",
    "source": "https://ursy.com/issues/hsts-missing/"
}