What AuditX checks
The scan uses the answer to one of the requests for a page that does not exist, the same request that the debug output check makes. It compares six headers: Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options, X-Frame-Options, Referrer-Policy and Permissions-Policy. It only looks at the ones your normal page already sends with a value. A header missing from the normal page is left to the checks for that header. The check passes when every one of those headers is also on the answer for the missing page. It warns when at least one is missing there, and names them. It is an info note, which does not lower the score, when the missing page was redirected to the homepage or to a short language path such as /en/, because there is then no separate error answer, or when the normal page sends none of the six headers. If no request completed, the result is an info note that says so. That check is left out of the score, the security score cannot go above 79, and if too many security checks are left out the score is not shown at all. If probes are turned off or the address is not public, the check does not appear. It compares only the presence of the headers, not their values, and looks at one answer. A warn lowers the security score by less than a fail would. This check never caps the overall score.
Why it matters
The OWASP Secure Headers Project describes the response headers an application can use to raise its security, and says that once they are set, browsers can be kept from running into easily preventable weaknesses.
The OWASP HTTP Headers Cheat Sheet advises setting headers so that they are sent on all responses. A header added only by application code often misses the error pages that the web server answers itself.
How to fix it
- Set the security headers at the web server or CDN, not only in application code, so that every answer carries them.
- In Apache, use the always form of the Header directive, so that the header is also sent on error answers.
- Open a made-up address on your site, look at the response headers in the browser developer tools, and compare them with a normal page.
- Scan again and confirm the warning has gone.
Header always set X-Content-Type-Options "nosniff"
Does your site pass this check? A free scan runs it with every other check and shows the result in about a minute.
Scan my site