Basic security headers are missing: Content-Security-Policy

Short answer

At least two of these three headers are missing from the page's HTTPS response: X-Content-Type-Options, Referrer-Policy and Content-Security-Policy (an X-Frame-Options header counts in place of the CSP). The finding names the missing ones. Add them on the server or CDN.

seo.security_headers · Priority: P3

What it means

These headers stop the page from being framed by other sites, from leaking full addresses to them and from being read as another file type. They take a minute to add on the server or CDN.

Why it matters for AI search

X-Content-Type-Options: nosniff stops browsers from treating a file as a different type than the server says, such as running an uploaded text file as a script. Referrer-Policy controls how much of the address is passed to other sites when a visitor follows a link, so private paths and query strings do not leak. frame-ancestors in the CSP, or the older X-Frame-Options, stops other sites from showing your pages in a frame to trick visitors into clicking (clickjacking).

These headers protect visitors; search engines and AI crawlers do not use them for ranking, so the finding is P3. The check runs on HTTPS pages, looks only at whether each header is present, not at its value, and does not report a single missing header.

How to fix it

  1. Add X-Content-Type-Options: nosniff. It is safe for almost every site.
  2. Add Referrer-Policy: strict-origin-when-cross-origin, the default in current browsers: other sites see only your domain, your own pages see the full address.
  3. For framing, add Content-Security-Policy: frame-ancestors 'self', or add the frame-ancestors directive to the CSP you already have. A full CSP that limits scripts and styles needs testing; start with Content-Security-Policy-Report-Only if you go further.
  4. Set them where every page passes through: the nginx or Apache config, your framework's middleware, or on Cloudflare a response header transform rule.
  5. Run "Check again" on the page report to confirm the result.

Example

# nginx
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Content-Security-Policy "frame-ancestors 'self'" always;

# Apache
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set Content-Security-Policy "frame-ancestors 'self'"

How to confirm the fix

After the change, press "Check again" on the report: it lists what was fixed and how the score changed.

Check my page →

All findings and how the score works