Websites

HTTPS and security headers: your website's invisible armour

The browser padlock only says the line is encrypted. Whether your site runs foreign scripts or can be trapped inside a frame is decided by a few lines no visitor ever sees.

Airnite Editorial Team22 November 2026 · 3 min
Published
Reading time
3 min
Author
Airnite Editorial Team

In short

  • TLS 1.0 and 1.1 have been officially deprecated since RFC 8996; BSI recommends TLS 1.3 and 1.2.
  • HSTS keeps browsers on HTTPS permanently; a Content Security Policy limits which scripts may run.
  • The headers cost no loading time but close entire classes of attack.

What it is about

Almost every website uses HTTPS today. But the browser padlock only means the connection is encrypted. It says nothing about whether the page is protected against injected scripts, clickjacking or a downgrade to an insecure connection.

That is what HTTP security headers are for. They are short instructions the server sends with every response and the browser enforces. The OWASP Secure Headers Project collects the recommendations.

How it works

TLS is the encryption underneath HTTPS. In 2021 the IETF officially deprecated TLS 1.0 and 1.1 with RFC 8996. Germany's BSI recommends TLS 1.3 and TLS 1.2 with suitable settings in its technical guideline TR-02102.

HSTS (Strict-Transport-Security, RFC 6797) tells the browser: only ever open this domain encrypted, for a defined period. An attacker on the same Wi-Fi can then no longer redirect the visitor to an unencrypted version.

Content Security Policy (CSP) defines the sources from which scripts, images and fonts may be loaded. If an attacker manages to inject code into the page, the browser refuses to run it. With the frame-ancestors directive it also prevents your page from being embedded invisibly in other sites.

X-Content-Type-Options: nosniff stops the browser from interpreting files differently than declared. Referrer-Policy controls which address information is passed on when someone clicks an external link.

Where it goes wrong

Headers are often missing entirely because site builders and hosting packages do not set them. Where they are set, the CSP is frequently so permissive that it prevents nothing, for example by allowing 'unsafe-inline'. An overly strict CSP, on the other hand, breaks forms or analytics if it goes live untested.

Another classic: after moving to a new host the settings are gone, because they lived in a configuration file nobody took along.

How to proceed

Check your domain with a public header test. Switch off outdated TLS versions and set HSTS. Introduce the CSP in report-only mode first (Content-Security-Policy-Report-Only), review the reports, then enforce it. Keep the headers in version control so they survive every move.

Read more: OWASP Top 10: the ten most common web risks, clearly explained, Core Web Vitals: what LCP, INP and CLS reveal about your website and TLS certificates: 200, 100, 47 days – why manual renewal is over.

How Airnite helps

Airnite ships every website with hardened headers and a current TLS configuration, and checks existing sites as part of a security review. The settings are versioned in Git on our side so nothing gets lost.

Checklist

Sources

Every fact in this article is based on the following publications. Primary sources are marked.

  1. OWASP FoundationOWASP Secure Headers ProjectStandardPrimary source
  2. IETF / RFC EditorRFC 6797: HTTP Strict Transport Security (HSTS)StandardPrimary source
  3. IETF / RFC EditorRFC 8996: Deprecating TLS 1.0 and TLS 1.1StandardPrimary source
  4. BSITR-02102 Kryptographische Verfahren: Empfehlungen und SchlüssellängenAuthorityGermanPrimary source
  5. MDN Web Docs (Mozilla)Content Security Policy (CSP)Vendor

Matching services

Read on

Current incidents and warnings are covered in the Zero Day magazine. Go to the magazine

Want to put this into practice in your company?

We assess your situation and tell you clearly what to do. For businesses, in confidence.

Talk to an expert now