X-Content-Type-Options: nosniff
One of the checks in every audibot report. This page says exactly what audibot reads, what passes, and how to fix it.
What audibot checks
Whether the X-Content-Type-Options response header on the home page contains nosniff.
- Pass
The header is set to
nosniff. - Warning
The header is missing.
Why it matters
Without it, a browser may ignore the declared Content-Type and guess from the content — treating an uploaded text file as a script, for example. nosniff makes it trust the declared type.
How do I set X-Content-Type-Options: nosniff?
Send the header on every response. It has one valid value and no side effects on a site that labels its files correctly.
nginx
add_header X-Content-Type-Options "nosniff" always;Apache (mod_headers)
Header always set X-Content-Type-Options "nosniff"Caddy
header X-Content-Type-Options "nosniff"Cloudflare
Rules → Transform Rules → Modify Response Header → Set static:
X-Content-Type-Options = nosniffRelated tools
- Security headers checker — Check the HTTP security headers sent by a homepage.
- Security headers generator — Write security header settings for your web server or hosting platform.
Other checks in Security headers
- Strict-Transport-Security (HSTS) header
- Content-Security-Policy header
- Clickjacking protection (frame-ancestors / X-Frame-Options)
- Referrer-Policy header
- Permissions-Policy header
- Software versions in response headers
- Cookie flags: Secure, SameSite and HttpOnly
- security.txt
Security headers in the methodology ·All guides
This check is one step of the website launch checklist.
Check your site
audibot runs this check and every other one in a single audit, and publishes the report with a recommendation for each finding.