EnsureDomains

Website Security Essentials: The Five Layers That Actually Stop Hacks

Most hacks aren't a hooded genius targeting you by name. They're bots scanning for known holes. Here are the five layers that shut them out.

EnsureDomains Team8 min read

Picture the attacker who breaks into a small site, and most people imagine a hooded figure in a dark room, picking your site out of a lineup and hammering at it by hand. That image is almost always wrong. The reality of website security is duller and far more relentless: automated bots crawl the entire internet around the clock, knocking on every door they find and testing for known, unpatched holes at a scale no human could match. They don't know your name or care what you sell. They just keep scanning until something gives.

That changes how you should defend a site. You are not outsmarting one clever opponent, you are raising the cost of an automated attack until the bot moves on to an easier target. The way you do that is with layers. No single setting makes a site bulletproof, but stack enough independent defenses and a hole in one is caught by the next. Here are the five layers that matter, in the order they tend to fail.

Layer 1 — Access and passwords

The front door is the login screen, and weak or reused passwords are the most common way bots walk straight through it. The attack has a name, credential stuffing: a bot takes a username and password leaked from a breach on an unrelated site and tries that same pair against thousands of other login forms, betting that people reuse passwords. They usually do. Give every account its own long, random password from a tool like our strong password generator rather than something you can type from memory, so a leak somewhere else can't unlock your site. Turn on two-factor authentication so a stolen password alone isn't enough, and limit failed login attempts so a bot can't sit there guessing thousands of times a minute. Take the extra minute to remove or rename the default admin account too, because admin is the first username every bot tries. Get this layer right and you've shut out the bulk of automated traffic before it touches anything else.

Layer 2 — Keep everything patched

Most successful break-ins exploit a flaw that was already fixed, sometimes months earlier, on a site that simply never updated. Here is the uncomfortable timeline: a vulnerability gets disclosed and patched, the fix is public, and within hours bots are scanning for sites that haven't applied it yet. The patch itself tells attackers exactly what to look for. Your platform core, every plugin, and every theme is a separate piece of software with its own security history, and a site running thirty plugins is carrying thirty independent update obligations. Apply updates promptly, turn on automatic updates for anything that supports them safely, and delete what you no longer use rather than leaving a dormant, unpatched plugin sitting on the server where it can still be exploited. An abandoned plugin that hasn't seen a release in two years is worse than no plugin at all. An outdated component is the single most reliable thing those scanning bots are looking for.

A glowing shield of light deflecting incoming digital threats away from a website
Defense in depth: each layer catches what the one before it missed.

Layer 3 — Encryption and transport

Everything between your visitor and your server travels over the open internet, and without encryption it travels in plain text that anyone on the path can read or tamper with, the network at a coffee shop, a misconfigured router, an internet provider in between. HTTPS closes that gap, and you enable it by installing an SSL certificate so logins, form submissions, and payment details are scrambled in transit. It also affects how browsers and search engines treat you, since both now flag plain HTTP sites as not secure, which means a missing certificate costs you visitor trust and search visibility on top of the security risk. Once it's installed, force every request to HTTPS and make sure old HTTP links redirect, otherwise you've left the encrypted and unencrypted versions running side by side. If you haven't set this up, our guide to SSL certificates covers what you need.

Layer 4 — A firewall and malware scanning

The first three layers harden your own setup, but a web application firewall (WAF) sits in front of the site and filters malicious requests before they ever reach it, blocking known attack patterns like SQL injection, cross-site scripting, and credential stuffing at the door. Think of it as inspecting every visitor's intent rather than just checking they have a valid address. Pair it with regular malware scanning so that if something does slip through, you find the infected files quickly instead of discovering them weeks later when a visitor's browser throws a warning. Scanning matters because a quiet compromise is the dangerous kind: attackers often inject spam links or skimming code and leave the site working normally, so nothing looks wrong until your traffic and reputation are already bleeding away. A managed website security service handles both for you and keeps the rules current as new threats appear.

Layer 5 — Backups you've actually tested

Every layer above can fail, which is why the last one assumes the worst already happened. Keep automated, off-site backups on a schedule that matches how often your content changes, so a busy store needs daily backups and a static brochure site needs far fewer. Off-site is the operative word: a backup stored on the same server as the site goes down with it, whether the cause is a hack or a hosting failure. Keep more than one version too, because a backup taken after an infection just preserves the infection. The part almost everyone skips is the test: a backup you've never restored is a guess, not a safety net. Run a trial restore now and then so you know it works, and that you know how to do it, before the day you desperately need it.

Where most small sites actually get breached

The five layers make more sense once you've seen the doors attackers actually use. Almost none of them involve breaking encryption or out-thinking a developer. They're mundane, and that's exactly why they work at scale.

  • Reused passwords. The same password protects your site, your email, and a forum you forgot about that got breached in 2019. One leak hands an attacker the set. This is the single most common entry point, and a unique password per account closes it entirely.
  • Outdated plugins and themes. An add-on you installed once for a contact form, never updated, and forgot about becomes the unlocked window. Most site compromises trace back to a known flaw in third-party code, not the core platform.
  • Weak hosting neighbors. On cheap shared hosting your site sits alongside hundreds of others, and a compromise of one poorly isolated account can spread sideways to the rest. You inherit your neighbors' bad habits, which is part of why hosting quality is a security decision, not just a speed one.
  • Exposed admin login. Leaving the default login URL public and unprotected hands bots a fixed target to hammer with guesses. Rate limiting, two-factor, and restricting access cut the attack surface sharply.
  • Leaked API keys and secrets. A password, database credential, or payment key accidentally committed to a public code repository or pasted into a forum is a gift. Bots scan public repositories specifically for these, and a leaked key can be live within minutes of being posted.

Notice that every one of these is preventable with the layers above, and none requires deep technical skill to close. That's the encouraging part: the same boring discipline that stops the common attacks stops most of the uncommon ones too.

Your 10-minute hardening checklist

  • Replace every admin password with a long, unique, randomly generated one.
  • Turn on two-factor authentication for all accounts that support it.
  • Limit failed login attempts and rename or restrict the default admin login URL.
  • Update your platform core, plugins, and themes to the latest versions.
  • Delete any plugin, theme, or user account you no longer use.
  • Confirm a valid SSL certificate is installed and force HTTPS everywhere.
  • Enable a web application firewall in front of the site.
  • Schedule regular malware scans and review the results.
  • Set up automated off-site backups on a sensible schedule.
  • Run one test restore to prove the backup actually works.

That list won't make you invincible, but it removes the easy wins that automated attacks depend on, and for most sites that is the difference between being a target and being skipped.

If you got hacked tomorrow, the worst move is to start deleting files in a panic. Work the problem in order instead:

  1. Take a snapshot of the site as-is, so you can investigate later without destroying evidence.
  2. Change every credential: admin logins, hosting, database, and any API keys.
  3. Scan and clean the infected files, or restore from a known-good backup if the damage is widespread.
  4. Patch the hole that let them in, since restoring onto an unpatched site just invites them back.
  5. Rotate your keys and secrets one more time, then watch the logs closely for repeat attempts.

Security isn't a switch you flip once and forget. It's five layers you set up deliberately and check on now and then, each one quietly covering for the others. Build them, test the backups, and the bots scanning your door will move along to a site that didn't bother.

Written by

EnsureDomains Team

Launchpad Premium

The best names never reach the public list.

Behind every brandable name we publish are the ones we hold back — reserved, high-value domains with a brand concept already built. Launchpad Premium is where you see them first.

  • First access to reserved, high-value names
  • A ready-made brand concept with every domain
  • Price-drop alerts on the names you're watching