X-Content-Type-Options Checker
Check whether a website sends an X-Content-Type-Options header to prevent MIME-sniffing.
Enter a domain to check whether it sends an X-Content-Type-Options header.
More Security Tools
View all 10JustChecker monitors your security headers continuously and alerts you if any regress.
What Is X-Content-Type-Options?
Setting X-Content-Type-Options: nosniff stops browsers from guessing ("sniffing") a file's type and treating, for example, an uploaded text file as a script. This tool checks whether the header is sent.
When to Use It
- On any site, and especially those that serve user uploads.
- During security reviews.
How to Use It
- Enter the domain.
- Check that the value is exactly
nosniff.
Understanding the Result
nosniff is the only valid value. It is safe to add site-wide as long as your server sends correct Content-Type headers.
Limitations
The check covers the page you enter; ideally the header is set for all responses, including files and API endpoints.
What MIME Sniffing Attacks Look Like
Suppose users can upload profile pictures, and someone uploads a file named avatar.jpg that actually contains JavaScript. Without nosniff, an older browser might inspect the content, decide it looks like a script, and run it when the file is referenced by a <script> tag. With nosniff, the browser trusts the declared Content-Type: image/jpeg and refuses.
How to Add It
# Nginx
add_header X-Content-Type-Options "nosniff" always;
# Apache
Header always set X-Content-Type-Options "nosniff"
# Express (Node.js) - the helmet package sets it by default
app.use(helmet());
Before You Enable It
- Make sure your server sends correct
Content-Typeheaders, especiallytext/cssfor stylesheets andtext/javascriptfor scripts - withnosniff, a stylesheet served astext/plainis blocked. - Include it on API responses and user-uploaded files, not just HTML pages.
Check every security header together with the Security Headers Checker and our security headers checklist.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.