Security alerts eMudhra CA compromise · Chrome drops the root Oct 27 Check your certificate → PHP2Shell · is your PHP version exposed? Check your site →

Help › Fix guides › Security headers missing

Fix guide · Web application · low

Security headers missing

A few short response headers switch off risky browser behaviour: X-Content-Type-Options stops browsers guessing a file's type (which can turn an upload into a script), Referrer-Policy stops full URLs, including tokens in them, leaking to other sites, and Permissions-Policy blocks the camera, microphone and location for anything on your pages that should not use them.

Time to fix

5 minutes

Risk if ignored

Content sniffing, URL leaks, feature abuse

Breaks anything?

Rarely. Allow a feature in Permissions-Policy if your site really uses it

How to fix it

In the server block:

add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
add_header X-XSS-Protection "0" always;

Then: sudo nginx -t && sudo systemctl reload nginx. Note: add_header in a location block replaces the server-level ones, so repeat them there if you use any.

X-XSS-Protection is outdated: modern browsers ignore it and the old filter caused its own bugs, so set it to 0. Your Content-Security-Policy is the real protection against XSS.

Check your fix

Rescan and we’ll confirm it’s fixed.

Common mistakes

  • Setting Permissions-Policy to block the camera or location on a page that needs it, like a video call or store locator. Allow it there with camera=(self).
  • Defining add_header inside a location block on nginx and losing all the server-level headers for those URLs.
  • Using Referrer-Policy: no-referrer everywhere, which can break analytics and some payment redirects. strict-origin-when-cross-origin is the safe default.

Still stuck?

Ask a human. We answer every ticket.

Tickets are answered 7am–7pm Pacific, usually within a few hours. Your whole conversation stays in your account.

Live chat, inside your ticket

On a Pro or Enterprise plan? Open any ticket and, when we’re online, chat with us live right there. The chat is saved on the ticket with everything else, so nothing gets lost.

Free plan: tickets only. Same people, same answers.

Not a customer yet? Questions about plans go to sales.