{
    "title": "No X-Content-Type-Options: nosniff",
    "description": "Without nosniff, browsers may guess a file's type from its contents, which can let an uploaded file run as a script.",
    "url": "https://ursy.com/issues/x-content-type-options-missing/",
    "canonical": "https://ursy.com/issues/x-content-type-options-missing/",
    "markdown": "https://ursy.com/issues/x-content-type-options-missing/index.md",
    "json": "https://ursy.com/issues/x-content-type-options-missing/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/x-content-type-options-missing/",
    "start_here": {
        "page": "https://ursy.com/issues/x-content-type-options-missing/",
        "markdown": "https://ursy.com/issues/x-content-type-options-missing/index.md",
        "json": "https://ursy.com/issues/x-content-type-options-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": "x-content-type-options-missing",
        "problem": "No X-Content-Type-Options: nosniff",
        "summary": "Without nosniff, browsers may guess a file's type from its contents, which can let an uploaded file run as a script.",
        "status": "Live",
        "priority": "low",
        "category": "security",
        "category_title": "Security and HTTPS",
        "why_it_matters": [
            "Browsers sometimes ignore the Content-Type a server sends and guess the type from the bytes. That guessing, called MIME sniffing, can let a file uploaded as a picture or text be run as a script or a page.",
            "X-Content-Type-Options: nosniff turns the guessing off. It is a one-line header with almost no risk, and nosniff is the only value it takes."
        ],
        "how_to_fix": [
            "Send \"X-Content-Type-Options: nosniff\" on every answer, and make sure each file is sent with its correct Content-Type, such as text/css for stylesheets and text/javascript for scripts.",
            "Most hosts, CDNs and security plugins can add it. Check with the Security Headers Checker."
        ],
        "steps": [],
        "check_it_is_fixed": "Run the Security Headers Checker again: it should find X-Content-Type-Options set to nosniff. Check the page still looks and works the same.",
        "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": "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/x-content-type-options-missing",
        "source": {
            "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Content-Type-Options",
            "title": "MDN: X-Content-Type-Options"
        },
        "cite": "No X-Content-Type-Options: nosniff. URSY.com. https://ursy.com/issues/x-content-type-options-missing/"
    },
    "headings": [
        {
            "level": 2,
            "text": "Why it matters",
            "id": "why-it-matters",
            "url": "https://ursy.com/issues/x-content-type-options-missing/#why-it-matters"
        },
        {
            "level": 2,
            "text": "How to fix it",
            "id": "how-to-fix-it",
            "url": "https://ursy.com/issues/x-content-type-options-missing/#how-to-fix-it"
        },
        {
            "level": 3,
            "text": "What the problem looks like",
            "id": "what-the-problem-looks-like",
            "url": "https://ursy.com/issues/x-content-type-options-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/x-content-type-options-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/x-content-type-options-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/x-content-type-options-missing/#fix-it-on-your-platform"
        },
        {
            "level": 3,
            "text": "WordPress",
            "id": "wordpress",
            "url": "https://ursy.com/issues/x-content-type-options-missing/#wordpress"
        },
        {
            "level": 3,
            "text": "Your server or hosting",
            "id": "your-server-or-hosting",
            "url": "https://ursy.com/issues/x-content-type-options-missing/#your-server-or-hosting"
        },
        {
            "level": 3,
            "text": "Your CDN (for example Cloudflare)",
            "id": "your-cdn-for-example-cloudflare",
            "url": "https://ursy.com/issues/x-content-type-options-missing/#your-cdn-for-example-cloudflare"
        },
        {
            "level": 2,
            "text": "Check it is fixed",
            "id": "check-it-is-fixed",
            "url": "https://ursy.com/issues/x-content-type-options-missing/#check-it-is-fixed"
        },
        {
            "level": 2,
            "text": "Official source",
            "id": "official-source",
            "url": "https://ursy.com/issues/x-content-type-options-missing/#official-source"
        },
        {
            "level": 2,
            "text": "Questions",
            "id": "questions",
            "url": "https://ursy.com/issues/x-content-type-options-missing/#questions"
        },
        {
            "level": 3,
            "text": "Can nosniff break anything?",
            "id": "can-nosniff-break-anything",
            "url": "https://ursy.com/issues/x-content-type-options-missing/#can-nosniff-break-anything"
        },
        {
            "level": 3,
            "text": "Do I need a developer?",
            "id": "do-i-need-a-developer",
            "url": "https://ursy.com/issues/x-content-type-options-missing/#do-i-need-a-developer"
        }
    ],
    "links": [
        {
            "text": "ChatGPT",
            "url": "https://ursy.com/wiki/chatgpt/",
            "internal": true
        },
        {
            "text": "MDN: X-Content-Type-Options",
            "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Content-Type-Options",
            "internal": false
        },
        {
            "text": "CDN",
            "url": "https://ursy.com/wiki/cdn/",
            "internal": true
        }
    ],
    "words": 516,
    "text": "Without nosniff, browsers may guess a file's type from its contents, which can let an uploaded file run as a script. Why it matters Browsers sometimes ignore the Content-Type a server sends and guess the type from the bytes. That guessing, called MIME sniffing, can let a file uploaded as a picture or text be run as a script or a page. X-Content-Type-Options: nosniff turns the guessing off. It is a one-line header with almost no risk, and nosniff is the only value it takes. How to fix it Send \"X-Content-Type-Options: nosniff\" on every answer, and make sure each file is sent with its correct Content-Type, such as text/css for stylesheets and text/javascript for scripts. Most hosts, CDNs and security plugins can add it. Check with the Security Headers Checker. What the problem looks like X-Content-Type-Options: nosnif A misspelt value, which browsers ignore. Leaving the header out has the same effect. What it looks like fixed X-Content-Type-Options: nosniff nosniff is the only value. Send it on every answer, with the correct Content-Type for each file. 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 a security header to [your website address], which runs on [your platform or server, e.g. WordPress on Apache]. A checker says answers have no \"X-Content-Type-Options: nosniff\", so browsers may guess a file's type and run an uploaded file as a script. First check: run \"curl -sI\" on the home page, one stylesheet and one script file (or ask me to paste the headers), and report the X-Content-Type-Options value and the Content-Type of each file. Explain plainly what you found, and flag any file served with the wrong Content-Type, because nosniff will make the browser refuse those scripts and styles. Then give me the exact change: send \"X-Content-Type-Options: nosniff\" on every answer, in one place only, and correct any wrong Content-Type first. Rules: back up configuration first, keep all other headers, and change nothing else. Give the exact line and where it goes. 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 Most security plugins can add it, or add Header always set X-Content-Type-Options \"nosniff\" to .htaccess on Apache hosting. Your server or hosting On nginx add add_header X-Content-Type-Options \"nosniff\" always; at server level. On Apache use Header always set X-Content-Type-Options \"nosniff\". Your CDN (for example Cloudflare) On Cloudflare, a response header Transform Rule can add it to every answer. Check it is fixed Run the Security Headers Checker again: it should find X-Content-Type-Options set to nosniff. Check the page still looks and works the same. Official source MDN: X-Content-Type-Options Questions Can nosniff break anything? Only files sent with the wrong type: a script that is not sent as JavaScript, or a stylesheet that is not text/css, will be refused. Fix the type and it works. Do I need a developer? Usually not. It is one line in a security plugin, the server settings or the CDN.",
    "source": "https://ursy.com/issues/x-content-type-options-missing/"
}