Skip to content

PHP security updates released 21 October 2026. The flaws are now being actively exploited, so check your website's PHP is up to date. Patches are available for older PHP versions too. What it means for your website

Security headers

HTTP security headers explained

Security headers are short instructions your website sends to every visitor's browser. Here's what each one does, how our checker judges it, and how to add the ones you're missing.
Published 4 November 2026 · Last updated 4 November 2026 · By Host Dada

What security headers are

Every time a browser asks for a page, the server sends back the page along with a set of HTTP headers: lines of information that visitors never see. Some of them tell the browser how to behave: only use an encrypted connection, don't let another site embed this page, don't run scripts from unknown places.

These settings don't harden your server. They ask the browser to protect your visitors, which is why they mostly limit the damage from certain kinds of attack rather than preventing a break-in. They're also among the few security settings anybody can read from outside, which is why our checker can report on them.

The five protections we check

Strict-Transport-Security (HSTS)

Tells browsers to use only HTTPS for your site for a set period, so nobody can quietly downgrade a visitor to an unencrypted connection. We only look for it on HTTPS responses. A max-age of at least six months (15552000 seconds) counts as good. A shorter or invalid value is flagged for attention, and so is a missing header. Read more in HSTS explained.

Strict-Transport-Security: max-age=31536000

Content-Security-Policy (CSP)

Lists where scripts, styles, images and other resources may load from, so an injected script from elsewhere is refused. If your site sends an enforced policy, we report it as set. We don't grade what the policy says, so a weak policy still shows as set. A policy sent only as Content-Security-Policy-Report-Only is flagged, because it watches without blocking. See our Content Security Policy guide.

X-Content-Type-Options

Stops browsers guessing what kind of file they've received. Without it, a file uploaded as harmless text could in some circumstances be treated as something that runs. There's only one useful value, and we look for it. It's among the easiest headers to add.

X-Content-Type-Options: nosniff

Referrer-Policy

Controls how much of your page's address is passed on when someone follows a link to another site. That matters if your addresses ever contain something private, such as an order number or a reset token. Any value counts as set except unsafe-url, which we flag because it sends the full address everywhere, even from HTTPS to HTTP. A missing header is only noted for information, because current browsers already default to something reasonably private.

Referrer-Policy: strict-origin-when-cross-origin

Clickjacking protection

Clickjacking means showing your page in an invisible frame on another site, so a visitor thinks they're clicking one thing and actually clicks a button on your site. You can prevent it in two ways, and we accept either: X-Frame-Options set to DENY or SAMEORIGIN, or a frame-ancestors rule in an enforced Content Security Policy. The old ALLOW-FROM form of X-Frame-Options doesn't count, because current browsers ignore it.

X-Frame-Options: SAMEORIGIN

Headers we don't report on

There are other useful headers, including Permissions-Policy and the Cross-Origin-* family. Our checker doesn't assess them, so a clean result says nothing about them either way. You may also see advice to add X-XSS-Protection. Modern browsers no longer have the filter it controlled, so it isn't worth adding, and we don't look for it.

What a missing header does and doesn't mean

A missing header is a configuration recommendation. It isn't a sign that your website has been hacked, and many perfectly safe websites lack several of them. Equally, a full set of headers doesn't make a site secure: they do nothing about an out-of-date plugin or a weak administrator password. If you're worried about those things, start with what to check if your website has been hacked.

Our checker only reads the response from your home page, so other pages on your site may send different headers. If a firewall challenges our check or your home page returns a server error, we tell you we couldn't verify your headers rather than reporting them as missing.

How to add them

Your host or developer can usually add the simple ones in a few minutes. Where you make the change depends on how your site is hosted. On shared hosting using Apache or LiteSpeed, it's often the .htaccess file (Apache needs mod_headers enabled):

Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set Referrer-Policy "strict-origin-when-cross-origin"

On nginx, it's the site's configuration file:

add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;

One nginx trap: by default, a block with its own add_header lines doesn't inherit those from the level above, so headers can vanish from part of a site. If you use a CDN or a web application firewall, it may also add, remove or replace headers, so always test the live site after a change. We suggest leaving HSTS and Content Security Policy until last, because a mistake with either can stop your site working for visitors.

Common questions

Which security header should I add first?
X-Content-Type-Options and clickjacking protection are simple and rarely cause problems. HSTS comes next, once HTTPS works everywhere on your domain. Content Security Policy takes the most care.
Can a WordPress plugin add security headers?
Often, yes. Several security and header plugins can do it. They only affect responses that pass through WordPress, so setting headers at server level covers more, including static files.
Will security headers affect my search rankings?
Don't add them for that reason. Their purpose is to protect visitors. HTTPS itself is the setting search engines have publicly said they take into account.

Run the free check

Check your website now. It's free, needs no account and takes a few seconds. You can read exactly how the check works and what it can't see, or find out more about the Security Checker on hostdada.co.uk.

Check your website now

Free, passive and takes a few seconds. No account needed.

Check My Website — Free