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.
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.
- OWASP FoundationOWASP Secure Headers Project
- IETF / RFC EditorRFC 6797: HTTP Strict Transport Security (HSTS)
- IETF / RFC EditorRFC 8996: Deprecating TLS 1.0 and TLS 1.1
- BSITR-02102 Kryptographische Verfahren: Empfehlungen und Schlüssellängen
- MDN Web Docs (Mozilla)Content Security Policy (CSP)
Matching services
Read on
OWASP Top 10: the ten most common web risks, clearly explained
The OWASP Top 10 is the chart of things that go wrong in web applications. Number one has been the same for years, and it has nothing to do with Hollywood hackers.Websites3 minCore Web Vitals: what LCP, INP and CLS reveal about your website
Your website is as fast as the feeling it creates on the first tap. Google measures that feeling with three numbers. Your customers notice it long before they can put it into words.Websites3 minTLS certificates: 200, 100, 47 days – why manual renewal is over
A calendar reminder once a year used to be enough. From 2029, a certificate expires every seven weeks. Anyone still renewing by hand will find the padlock in the browser becomes a gamble.Current incidents and warnings are covered in the Zero Day magazine. Go to the magazine