Security headers explained in plain English

Security headers are short instructions your website sends to a visitor's browser, telling it how to behave more safely while it loads your pages. They travel invisibly with every page in the HTTP response, and the browser quietly obeys them.

Explainer6 min read

On their own they will not stop a determined attacker, but they close off a set of common, everyday tricks: pages being framed by a scam site, scripts being injected, content being sniffed into the wrong type, private links being leaked. Most sites are missing several of them, and most owners have no idea, because nothing on the page looks different.

This guide answers what security headers are by walking through the six worth caring about, the everyday risk each one reduces, and how to see which ones your own site is sending.

What a security header actually is

When someone visits your site, your server replies with two things: the page itself, and a set of response headers that describe it. Security headers are a handful of those response headers that ask the browser to apply extra safety rules.

Because they are sent by the server and acted on by the browser, you do not need to change how your page looks or how visitors use it. You add the header once, in your server config, your CMS or a plugin, and every page inherits the protection.

They are a layer, not a cure. They make a site harder to abuse, but they do not patch software, remove malware or replace good passwords. Think of them as locking the windows after you have already locked the door.

X-Frame-Options: stops your pages being framed by a scam site

This header controls whether other websites can load your pages inside a hidden frame. Without it, an attacker can place your real login page inside their own page and trick a visitor into clicking buttons they cannot see, a trick called clickjacking.

Setting it to DENY or SAMEORIGIN tells browsers to refuse to display your site inside someone else's frame, which removes that whole class of overlay scam. A Content-Security-Policy frame-ancestors rule does the same job in a more modern way.

Content-Security-Policy: limits which scripts can run

A Content-Security-Policy (CSP) is a list of the sources a browser is allowed to load scripts, styles, images and other content from. It is the strongest header here and also the fiddliest to set up.

Its main value is reducing cross-site scripting, where a malicious script slips into your page (through a comment box, an ad, or a compromised third-party file) and runs as if you wrote it. A good CSP means the browser simply refuses to run anything from a source you did not approve.

Because a strict policy can accidentally block your own legitimate scripts, it is worth testing carefully, often in report-only mode first, before you enforce it.

Strict-Transport-Security (HSTS): keeps visitors on HTTPS

HSTS tells the browser to only ever connect to your site over a secure HTTPS connection, for a set period defined by a max-age value. Once a browser has seen this header, it refuses to fall back to plain, unencrypted http.

This closes a gap where someone on the same network (a cafe, an airport, a hotel) tries to intercept that very first insecure request and downgrade the visitor to an unencrypted connection. A real max-age, rather than a token few seconds, is what makes it count.

Free, instant, no account

See your site's security grade in seconds.

Free, instant, and no account needed to see your grade.

Scan my site free

Plain-English A to E grade in about 10 seconds. No account needed to see it.

The three quieter headers: nosniff, Referrer-Policy and Permissions-Policy

These three are smaller but easy wins, and together they tidy up a lot of loose ends.

X-Content-Type-Options: nosniff stops the browser from guessing a file's type and, for example, running an uploaded image as if it were JavaScript. Referrer-Policy controls how much of your URL is leaked to other sites when a visitor clicks away, which protects private or token-bearing links. Permissions-Policy lets you switch off browser features your site does not use, such as the camera, microphone or geolocation, so a hijacked script cannot reach for them.

  • X-Content-Type-Options: nosniff stops a file being mistaken for a more dangerous type
  • Referrer-Policy limits how much of your address bar is shared with other sites
  • Permissions-Policy turns off powerful browser features (camera, mic, location) you do not need

How to check the security headers on your own site

You do not need to read raw server responses by hand. Our free external scan reads the headers your site already serves publicly and reports, in plain English, which of these six are present, which are missing, and what each missing one leaves open.

It only reads what is public: HTTP responses and headers, the TLS certificate, public DNS and a few well-known paths. It does not log in, attack or change anything. You get a 0 to 100 score and an A+ to F grade in about ten seconds.

One honest caveat: missing headers can only nudge your grade, never sink it, because a hardened header set does not fix an expired certificate, an exposed secret or out-of-date software. Headers are one useful signal among several the scan looks at, and a sensible first thing to put right.

Security headers are free instructions that ask a visitor's browser to behave more safely; the six that matter block clickjacking, script injection, downgrade attacks and a few quieter leaks. They are a strong, low-effort layer, not a substitute for patching software or fixing certificates.

Common questions

What are security headers, in one sentence?
They are HTTP response headers your server sends with every page that ask a visitor's browser to apply extra safety rules, such as refusing to be framed by another site or only connecting over HTTPS. They reduce common, automated tricks without changing how your page looks.
Are security headers really necessary for a small business site?
Yes, and they are some of the cheapest protection you can add. They close off common, automated tricks like clickjacking and script injection that target any site, not just big ones. Most small sites are missing several, usually because nobody knew to set them.
Will adding security headers slow my website down?
No. Headers are tiny pieces of text sent alongside pages you are already serving, so there is no measurable speed cost. The only thing to watch is a strict Content-Security-Policy, which needs testing so it does not accidentally block your own scripts.
How do I add security headers to my site?
It depends on your setup. They can be set in your web server config (Apache or Nginx), through your host's control panel, or via a plugin on platforms like WordPress. The right values vary by site, so test changes, especially CSP, before enforcing them.
Can your free scan tell me which headers I am missing?
Yes. The scan reads the headers your site already serves and lists which of the six key ones are present or missing, with a plain explanation and fix for each. It is an external, read-only check that does not log in or change anything.
Do security headers protect against malware or viruses on my server?
No. Headers tell the browser how to behave; they do not look inside or clean your server's files. If you suspect malware, use a server-side scanner or ask your host. Our free check looks only at external signals like blocklist reputation and a few exposed paths, which is a useful first hint but not proof your files are clean.

How safe is your website?

A free A to E grade in about 10 seconds. No account needed.

Check my site