Website hardening explained: building layers of defence
What is website hardening? It is the practice of reducing the ways an attacker can reach or abuse your site by tightening many small settings, rather than relying on any single one. It is sometimes called defence-in-depth: if one layer fails, the next still protects you.
No website is ever finished being secured, but most of the high-value steps are well understood and quick to apply. Many of them live in your encryption, your HTTP response headers, your DNS records and your email setup.
This page is a hub. It explains each layer in plain English and points you to the specific fix guides, so you can work through them one at a time.
What hardening actually means
Hardening is the opposite of leaving defaults in place. A fresh website, server or content management system tends to ship with settings chosen for easy setup, not for safety. Hardening means going through those settings and closing the gaps an attacker would otherwise walk through.
The goal is not one perfect wall. It is several modest walls, each cheap on its own, so a single missing setting does not hand someone the keys.
- Encryption so traffic cannot be read or tampered with in transit
- Browser instructions (headers) that block common attacks like clickjacking
- Hiding software versions so you are not an obvious target
- DNS and email records that stop your domain being spoofed
- Removing files that should never be public
The core layers of website hardening
Most practical hardening falls into a handful of areas. You do not need to be technical to understand what each is for, even if your developer or host applies the change. Each layer below has its own fix guide.
- Encryption: serve everything over HTTPS, keep a valid certificate from a trusted authority, redirect http to https, and turn off outdated TLS 1.0 and 1.1.
- Security headers: add HSTS, a Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy and Permissions-Policy so browsers enforce safer behaviour.
- Cookies: mark homepage cookies as Secure, HttpOnly and SameSite.
- Version hiding: stop your server banner, X-Powered-By, PHP version and (on WordPress) the core version and readme leaking what you run.
- DNS hardening: add DNSSEC and a CAA record so your domain and certificates are harder to hijack.
- Email anti-spoofing: publish SPF, DMARC (with an enforced policy, not just p=none) and MTA-STS so others cannot send mail as you.
Why layers beat a single fix
Attackers rarely need one big flaw. They chain small oversights together: an exposed version reveals what to target, a missing header lets a script run, a weak cookie lets it persist. Hardening breaks those chains.
This is also why a scoring tool weights issues differently. A critical problem, such as no working HTTPS, an exposed secret or an untrusted certificate, is a serious gap on its own. A single missing hardening header is a nudge, not a disaster. You want both fixed, but they are not the same weight.
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 freePlain-English A to E grade in about 10 seconds. No account needed to see it.
How the free EB Security check fits in
Our free check is a fast first signal across every layer above. It reads only what your site already serves publicly: HTTP responses and headers, the TLS certificate, public DNS and a small set of well-known paths. It then returns a 0 to 100 score and an A+ to F grade in about ten seconds, with a plain-English fix for each finding.
It is an external, passive check. It does not log in, brute-force, fuzz or exploit anything, and it is not a penetration test. Use it to see which layers are weak, then work through the matching fix guides. No account is needed to see your grade, and weekly monitoring is available from £9.99 a month.
What an external check cannot harden for you
External checks see the outside of your site, not the inside. There are real layers our check cannot reach, and being honest about them matters. For those, harden separately and treat the free grade as one useful input among several.
- Malware in your files: our signal is external reputation (Spamhaus, SpamCop and Barracuda blocklists, plus a Google Safe Browsing reputation lookup when configured) and a few exposed-path checks. A clean external result does not prove your files are clean, so run a server-side scanner or ask your host.
- Plugin and theme vulnerabilities: we check WordPress core version, readme exposure, xmlrpc and username enumeration only, never your installed add-ons. Keep plugins and themes updated and audited yourself.
- Passwords, admin access and backups: strong credentials, limited admin accounts and tested backups are core hardening too, and sit outside any external scan.
Website hardening is layered defence: fix HTTPS, headers, cookies, version leaks, DNS and email anti-spoofing one step at a time. The free EB check shows which layers are weak in about ten seconds, but pair it with a server-side scan and good password and backup habits for the parts an external check cannot see.