Security headers are hidden instructions your site sends with each page that tell the visitor’s browser which protections to switch on. Your site sends them with every page and the visitor’s browser follows them, which makes them one of the cheapest layers of protection you can add.
What are security headers?
Security headers are HTTP headers. Examples of what they can do: allow only HTTPS, or limit which scripts may run.
Every response from your server carries HTTP headers, and some of them are about safety. The browser does what a header says: if you tell it to only ever use a secure connection, it will refuse to fall back to an insecure one. If you tell it which scripts are allowed, it will block the rest.
The main ones are easy to name. Strict-Transport-Security tells the browser to use HTTPS for your site, building on your TLS setup. Content-Security-Policy lists which sources of scripts, styles and images are allowed.
X-Content-Type-Options stops the browser from guessing file types. A frame rule, either the frame-ancestors part of the policy or the older X-Frame-Options, controls who may show your page inside a frame. Referrer-Policy limits how much of your address is passed to other sites.
Permissions-Policy limits browser features like the camera.
What they do and do not do
Security headers work in the visitor’s browser. They cannot fix a weakness on your server, and they do not stop an attack that does not reach a browser. What they do is make a whole family of browser-side problems harder, for instance by limiting what an injected script from cross-site scripting can do.
What it means for a PHP or WordPress site
Which PHP version does your site report?
We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.
Neither PHP nor WordPress core sets a full set of security headers for you. They come from your web server configuration, your host, a CDN or a plugin. On many sites some are missing, which is easy to spot and cheap to fix.
The Content-Security-Policy is the trickiest, because WordPress themes and plugins often rely on inline scripts and outside services that the policy would block.
Headers sit next to other signals that your site sends to the outside. The X-Powered-By header, for example, reveals your PHP version, while the headers above add protection.
A concrete example
You open your site’s response headers in your browser’s developer tools. You see a line “Strict-Transport-Security” and a line “X-Content-Type-Options: nosniff”, but nothing for Content-Security-Policy or Referrer-Policy. That is a normal picture.
The first two are quick to add and rarely cause trouble. The policy needs more care: start in a mode that only reports what would be blocked, fix what shows up, then enforce it.
How to check and when to act
Use your browser’s developer tools to read the headers, or an online header scanner. With our free tool you can check your PHP version: it reads the public headers of your site and tells you what it can see from the outside. Start with the cheap headers, plan the strict policy and write down what you changed.
If your site mostly shows content, a site that you move from WordPress to a static site is served as files from a host or CDN where the headers are set once in one place, which makes this much easier to keep right. Whatever route you pick, headers are an extra layer, and updating the software stays the main job.
Not sure how this applies to your site?
Ask a person to take a look. We check which PHP version your site runs and whether the fix is in, and tell you the next step.
Or have PHP updated right away: PHP update from $555 excl. VAT
Frequently asked questions
Which security headers matter most?
A good starting set is Strict-Transport-Security (only HTTPS), Content-Security-Policy (which scripts may run), X-Content-Type-Options, a frame-ancestors rule or X-Frame-Options (who may embed your page) and Referrer-Policy.
Do security headers fix vulnerabilities?
No. They add a layer of protection in the visitor's browser and limit what a flaw can do. The flaw itself is fixed by updating the software.
Where do I set security headers?
On the web server, in the CDN or host settings, or through a plugin. Where depends on how your site is served. A host or developer can set them for you.
Can security headers break my site?
Yes, mainly a strict Content-Security-Policy, which can block scripts and styles your site needs. Test changes on a copy and roll out gradually.