Docs Security
X-Content-Type-Options
Checks for an X-Content-Type-Options header set to nosniff, which stops browsers guessing a file's type from its contents.
What it checks
We read the X-Content-Type-Options header on the homepage response.
- PassThe header is set and contains nosniff.
- WarningThe header is set to something else. nosniff is the only valid value.
- FailNo X-Content-Type-Options header.
Why it matters
Without it, some browsers try to guess what a file is from its contents. A file uploaded as an image or text could then be treated as a script or stylesheet and run in your page.
How to fix it
Send the header with the value nosniff on every response. Before you do, make sure your server sends the right Content-Type for scripts and stylesheets, because with nosniff the browser refuses to use a script or stylesheet served with the wrong type.
Platform notes
Add it with a Transform Rule that modifies response headers.
Use add_header on Nginx or Header set on Apache.
Set it in next.config.js headers, vercel.json, or a Netlify _headers file.
Add it in server config, through your host, or with a security header plugin.
These platforms control the response headers on their own hosting, so there is usually no setting for this header in the site editor. If you need it, ask the platform's support what your plan allows.
Your report shows what this check found on your site. Pro shows the exact fix for your site. See pricing.
Free, about 30 seconds, with every other check included.