Guide

Security headers explained for businesses

Every time someone opens your website, the server sends instructions to the browser. Some of them protect your visitors, if they are there.

By Erik Lindqvist, WebbLarm · 10 November 2026 · 5 min read

What a security header is

When the browser fetches a page, it first gets a few lines of information called headers. The server can use them to say things like “always use an encrypted connection” or “do not show this page inside someone else’s website”.

Visitors do not see the headers, but the browser follows them. They cost nothing and are set on the server, often with a few lines in a settings file.

The most important ones

Header What it does
Strict-Transport-Security (HSTS) Says the website must always be opened over an encrypted connection, even if someone types http.
Content-Security-Policy (CSP) Tells the browser where scripts, images and fonts may be loaded from. Makes it much harder to inject malicious code into the page.
X-Content-Type-Options Stops the browser from guessing the file type, which closes a known route for attacks.
X-Frame-Options or frame-ancestors Stops your page from being shown inside another website, where someone could trick the visitor into clicking.
Referrer-Policy Limits how much of the address is passed on when someone clicks a link.
Permissions-Policy Turns off features the website does not use, such as the camera and microphone.

Which ones should you have?

All websites should have HSTS, X-Content-Type-Options, protection against embedding and a Referrer-Policy. They are easy to switch on and rarely change anything for the visitor.

CSP needs more thought. A rule that is too strict can block things your website needs, such as a chat tool or a map. Start in report mode and tighten the rules step by step.

How to check

Open the website in Chrome or Edge, press F12, go to the Nätverk (Network) tab and reload the page. Click the first row and look under Svarshuvuden (Response headers). It lists the headers the server sends.

You can also see how our own website looks. webblarm.com has all the headers above, and we say more on the page Säkerhet och förtroende.

Security headers are part of the free check, and we set them up in Åtgärd.

Which headers is your website missing?

Enter the address and your email. The result arrives by email within five minutes.

By email within five minutes: what anyone can see from the outside about HTTPS, email protection, server and plugins, and what is still hidden. Free.

0 SEK · public information only

By sending you confirm that you represent the website. We only use your address to reply. Privacy policy (Swedish).