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.

SecurityWeight 1In reports as nosniff

What it checks

We read the X-Content-Type-Options header on the homepage response.

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

Cloudflare

Add it with a Transform Rule that modifies response headers.

Nginx and Apache

Use add_header on Nginx or Header set on Apache.

Next.js, Vercel and Netlify

Set it in next.config.js headers, vercel.json, or a Netlify _headers file.

WordPress

Add it in server config, through your host, or with a security header plugin.

Shopify, Wix, Squarespace and Webflow

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.

See what this check finds on your site

Free, about 30 seconds, with every other check included.