X-Content-Type-Options Header Explained

What the HTTP X-Content-Type-Options header does and when it's used.

Published October 16, 2026

The X-Content-Type-Options header set to "nosniff" to stop browsers from guessing (MIME-sniffing) a response's content type.

Key points

  • Prevents certain attacks where a file is uploaded as one type but interpreted as another, like executable script
More HTTP articles