Last updated: · By Asael Dreyer
In short: website security is six layers of defense, from the domain to WordPress: the domain registrar, DNS, Cloudflare or another CDN, the server, the application and your accounts. Most WordPress hacks come from outdated plugins and weak passwords, not from sophisticated attacks. Managed hosting such as Cloudways covers the server layer, but the domain, the site and access to it stay your responsibility.
⏱ Reading time: about 17 minutes · Level: beginner and up · Last checked: 7 Nov 2026
| Layer | First step | Who is responsible |
|---|---|---|
| 1. Domain registrar | Two-factor authentication and a transfer lock | You |
| 2. DNS | A DNS provider with 2FA, and DNSSEC if supported | You |
| 3. Cloudflare / CDN | WAF and blocking of sensitive paths | You (using Cloudflare’s tools) |
| 4. The server | Firewall, system updates, brute-force protection | The hosting provider |
| 5. The application | Updates, deleting unused plugins, malware scanning | You |
| 6. Accounts | 2FA for the hosting panel and WordPress, one user per person | You |
Why do websites get hacked?
Websites get hacked mainly because of known vulnerabilities that were never patched and weak passwords, and usually by bots rather than by a person. Most hacks are not aimed at you personally: bots crawl the internet automatically and look for any site with a known weakness. These are the common ways it happens.
| Threat | What it is | How to defend |
|---|---|---|
| Vulnerable plugin or theme | A known flaw in code that was not updated | Regular updates, a vulnerability scanner, deleting unused plugins |
| Password guessing (brute force) | A bot tries thousands of passwords on the login page or over SSH | A strong password, two-factor authentication, blocking repeated attempts |
| Malware | Code injected into the site: spam redirects, data theft, crypto mining | Scanning, runtime protection, cleanup and a clean backup |
| DDoS / DoS | Flooding the server with requests until it collapses | Network and server-level protection, a CDN |
| Malicious bots | Scanning, content scraping, form spam, resource drain | Bot blocking, a WAF |
| “Nulled” theme or plugin | A pirated copy of a paid plugin, often with malicious code built in | Install only from official sources |
| Phishing and stolen credentials | A fake email that tricks an admin into handing over a password | Two-factor authentication, awareness, a separate user for each person |
The cost of a hack does not end with the cleanup. A hacked site can get a warning in Google, lose its rankings in search results, be blocked by browsers and send out spam in your company’s name. Customer trust, once damaged, comes back slowly.
Who is responsible for which website security layer?
The hosting provider is responsible for the network, the server and the operating system; you are responsible for the site, access to it and the domain. Good security is built like an onion: each layer stops part of the threats, and when one fails, the next one catches what slipped through.
| Layer | What it protects | Responsibility |
|---|---|---|
| Network | DDoS floods, large-scale malicious traffic | The cloud provider and the hosting provider |
| Server firewall (WAF) | Malicious requests, bots, known attack attempts | The hosting provider |
| Operating system and server software | Vulnerabilities in the OS, PHP and the database | The hosting provider (on managed hosting) |
| Application (WordPress, plugins, theme) | Flaws in the site’s code | You |
| Access | Who can log in to the dashboard, SFTP and the hosting panel | You |
| Backups | The ability to return to a clean state | Shared: the provider supplies the tool, you make sure it works |
How do you secure each layer, from the domain to WordPress?
Work from the outside in: whoever controls the domain controls the site, so you start at the registrar and finish with your accounts. For each layer, here are the main steps and the detailed guide that goes with it.
Layer 1: The domain registrar
Anyone who gets into your account at the domain registrar can point your site and your email anywhere. Turn on two-factor authentication on the registrar account, make sure the domain is registered to the business and not to the person who built the site, and check that the recovery email is an address you still read. Turn on auto-renewal: an expired domain is a security risk, not just an inconvenience.
Layer 2: DNS
Changing a single A record is enough to send your visitors to a different server. Manage DNS with a provider that supports two-factor authentication, and limit which team members can edit records. DNSSEC is a cryptographic signature on your DNS records that prevents answers from being forged along the way; Cloudflare lets you enable it, and for some country-code domains your registrar must support it as well. To see how to connect a domain through Cloudflare, read connecting a domain to Cloudways through Cloudflare.
Layer 3: Cloudflare or a CDN with a WAF
A layer that sits in front of the server hides its IP address, filters bots and stops some DDoS attacks before they use up any resources. Block or challenge access to sensitive paths such as wp-login.php and xmlrpc.php. For the difference between the free plan and Enterprise, see Cloudflare Free vs Enterprise. For what to do during an attack, see DDoS attack on a website.
Layer 4: The server
On managed hosting, this layer belongs to the provider: the firewall, operating system updates, brute-force protection and isolation between sites. What remains for you is to limit SSH and SFTP to known IP addresses and to check that the hardening settings are switched on. The full guide is hardening your server and site on Cloudways. And for why server-level protection beats a plugin inside WordPress, see Wordfence vs server security.
Layer 5: The application (WordPress)
This is the layer where most hacks happen. Update core, plugins and your theme, delete whatever you do not use, and scan for malware regularly. A forgotten file-manager plugin with no updates is a good example; see the WP File Manager hack. Signs that something has already happened: the “dangerous site” warning in Google or Japanese spam in your search results. The full 12 steps are further down this page.
Layer 6: Accounts
The hosting panel, WordPress, email and your Cloudflare account are four separate doors. Use two-factor authentication on all of them, give each person their own user, and remove access for anyone who has stopped working with you. On Cloudways, see Cloudways account security and team member permissions.
How do you check the sensitive spots yourself?
A basic check takes a few minutes and you can run it on any site. Send curl requests from your own computer to the sensitive paths, and look up your domain’s DNS records.
| What to check | Desired result | Why it matters |
|---|---|---|
| /wp-login.php and /xmlrpc.php | Blocked or challenged (403 or a verification page) for an automated request | These are the paths bots attack when guessing passwords |
| /.env and /wp-config.php | 403 or 404, with no file contents | Configuration files should never be exposed to the internet |
| DNSSEC (DS record) | Check whether DNSSEC is active, and enable it if your registrar supports it | Signing your DNS records makes forged answers harder |
| HSTS header on the home page | Check whether HSTS is active, and enable it once you have confirmed HTTPS works across the whole site | The browser goes straight to HTTPS, with no redirect in between |
If a sensitive path returns 200, add a block for it right away, at the WAF layer or on the server. Check whether DNSSEC and HSTS are active, because both are one-time settings that add a layer of protection. I explained how to tell which layer a 403 came from (Cloudflare, Nginx or Apache) in the guide to the 403 Forbidden error. One more block you can switch on with a click in the Cloudways panel: Direct PHP Files Access, which blocks direct PHP execution in plugins and uploads.
What should a secure hosting provider give you?
Secure hosting is the foundation. If the server itself is vulnerable, no security plugin will save you. Here is what to check with any provider:
- A server-level firewall that stops malicious requests before they reach WordPress and use up resources.
- Regular security updates for the operating system and the server software.
- Isolation between sites: dedicated resources, so a breach of another customer’s site cannot reach you.
- Brute-force protection on SSH and on the login page.
- Free SSL with automatic renewal.
- Automatic off-server backups, with one-click restore.
- Malware scanning and vulnerability scanning, with an alert when something is found.
- Two-factor authentication for the hosting control panel itself.
How do you secure a WordPress site? 12 steps
These are the steps that are your responsibility, in order of importance. Doing all of them takes about two hours the first time, and a quarter of an hour a month after that.
- Update everything: WordPress, plugins and your theme. Most hacks exploit flaws that a newer version had already fixed.
- Delete what you do not use: a deactivated plugin still sits on the server and can be vulnerable. Old themes too.
- Do not install “nulled” plugins: saving a few tens of dollars can cost you an entire site.
- Strong passwords and a password manager: a long, unique password for every system: WordPress, the hosting panel, SFTP and email.
- Two-factor authentication: for all site admins and for the hosting panel. It stops most takeover attempts, even when a password has leaked.
- Minimum permissions: a content writer gets the “Editor” role, not “Administrator”. Each person gets their own user, and you delete the users of anyone who has left.
- HTTPS across the whole site: install SSL and redirect all traffic from HTTP to HTTPS.
- Block file editing from the dashboard: adding the line
define('DISALLOW_FILE_EDIT', true);to wp-config.php stops an attacker who has gained admin access from editing code directly. - Restrict SSH and SFTP access: only from your own IP addresses, and preferably with keys instead of a password.
- Turn on vulnerability and malware scanning, so you hear about a problem before Google or your customers do.
- Back up by the 3-2-1 rule: three copies, on two types of storage, one of them off the server. And test a restore once a quarter.
- Put a CDN with a WAF in front (Cloudflare, for example) for sites that are exposed to attacks or heavy bot traffic.
Why are bots a threat even when they do not break in?
A large share of the traffic to any site is not human. There are good bots (Googlebot, which crawls your site for search) and malicious ones: vulnerability scanners, password guessers, content scrapers and form spammers. Even when they fail to break in, they eat CPU and memory and slow the site down for real visitors.
The fix is filtering at the server or CDN level, before the request reaches WordPress. A security plugin inside WordPress can block them too, but only after the server has already run PHP and paid the price. On Cloudways this is done with Bot Protection; see the guide to blocking malicious bots.
What do you do when your site has been hacked?
Do not panic, and do not delete things in a hurry. This order limits the damage and preserves evidence for analysis.
- Change the passwords for every system: WordPress admins, the hosting panel, SFTP/SSH, the database and email.
- Take a backup of the current state, even if it is infected, for analysis.
- Contact your hosting provider’s support and report it. Some providers include cleanup in the service or as an add-on.
- Restore from a clean backup from before the hack, if you have one, or clean the site with a malware scanner.
- Close the hole: update whatever was out of date and delete suspicious plugins and users. Otherwise the hack will come back.
- Check Google Search Console for a security alert, and request a review after the cleanup.
The full step-by-step guide: my website was hacked: what to do.
What is included in Cloudways security, and what costs extra?
Based on the official Cloudways security pages, as of November 2026, these are the layers that come with a Flexible server and the ones that are add-ons.
| Component | What it does | Price |
|---|---|---|
| Server-level firewall (Imunify360) | Filters malicious traffic, bots, DoS and login attempts | Included |
| Layer 3 and 4 DDoS protection | Comes from the cloud providers | Included |
| Fail2Ban and brute-force protection | Blocks addresses that try to guess passwords over SSH and HTTP | Included |
| Operating system updates | Regular security patches for the server | Included |
| WordPress vulnerability scanner (Patchstack) | Alerts on flaws in core, plugins and themes | Included |
| IP and country blocking, Web Honeypot | Manual blocking and a trap for bots | Included |
| Allowlisted IPs for SSH/SFTP | Server access only from addresses you approve | Included |
| Let’s Encrypt SSL | HTTPS encryption | Included |
| Bot Protection | Blocks malicious bots | Included |
| Malware Protection | Automatic cleanup, runtime protection, database scanning, manual cleanup by support when needed | $4 per application per month (1–5 applications), $3 (6–15), $2 (16 and up) |
| Cloudflare Enterprise | CDN, WAF and edge caching | From $4.99 per month per domain |
Note the difference between detection and cleanup: according to the Malware Protection page, detecting malware on Flexible is free, but the automatic cleanup is part of the paid add-on. Details and setup are in Malware Protection on Cloudways, and the hardening I recommend for the server is in how to strengthen server and site security on Cloudways. All add-on prices are collected in the Cloudways add-on price list.
What is still on you even on Cloudways: updating plugins and your theme, managing WordPress users and permissions, and two-factor authentication for the panel. Also, without root access you cannot install your own security software at the operating system level. For most sites that is not a gap, but an organization with unusual security requirements should check this up front.
The code BFCM802 takes 80% off your bill for the first two months (up to $200 off per month), including unlimited free site migrations. New customers only, and only until the offer ends.
The offer ends on December 4, 2026 at 23:59 (UTC+2).
Start with a free trial, no credit card. Enter the code at checkout and check that it shows up.
After Black Friday: 30% off for 3 months with the code ASAEL. On a large server (above about $444 a month) ASAEL already saves more today. BFCM802 vs. ASAEL calculator
Start a free trial server, no credit card. When you move to a paid plan, the code ASAEL takes 30% off your bill for the first three months.
The link fills in the code on the signup form. Just make sure it shows up.
Website security checklist by layer
- ☐ Two-factor authentication at the domain registrar, auto-renewal on, domain registered to the business
- ☐ A DNS provider with two-factor authentication; DNSSEC if the registrar supports it
- ☐ Cloudflare or a CDN with a WAF in front of the server
- ☐ WordPress, plugins and theme up to date
- ☐ No inactive plugins or themes
- ☐ No plugins from unofficial sources
- ☐ Two-factor authentication for all admins and for the hosting panel
- ☐ A separate user for each person, with the minimum permissions
- ☐ SSL active and a full redirect to HTTPS
- ☐ File editing from the dashboard blocked
- ☐ SSH and SFTP restricted to known IP addresses
- ☐ Firewall and bot blocking active on the server
- ☐ Vulnerability and malware scanning active, with email alerts
- ☐ Automatic off-server backup, with a restore tested in the last quarter
Which website security myths are wrong?
“My site is small, nobody will bother hacking it.” Bots do not check how well known your site is. They look for a weakness, and a small, outdated site is an easy target to use as a spam server.
“I have SSL, so my site is secure.” SSL encrypts the connection between the visitor and the server. It does not protect you from a vulnerable plugin, a weak password or malware.
“A security plugin solves everything.” A plugin is one layer, and it runs inside WordPress too. Server-level protection stops attacks earlier and without using the site’s resources.
“My host makes backups, so a hack is no big deal.” Only if the backup is from before the hack, is clean, and is stored off the server. And after a restore, if you have not closed the hole, the hack will come back.
Sources
This page is based on the following official documentation and pages:
- Cloudways Features
- Cloudways Malware Protection Add-on with Automatic Cleanup
- Hardening WordPress (WordPress.org)
- DNSSEC (Cloudflare Docs)
- Strict-Transport-Security (MDN)
Would rather not handle this yourself? On the website maintenance page I broke down what a maintenance package should include and what it costs.
Website security FAQ
Common signs: redirects to foreign sites, pages or users you never created, a warning in Google or the browser, a sudden slowdown, and your emails landing in spam. A malware scanner and Google Search Console will usually warn you before you notice it yourself.
Not strictly, but a plugin can add a layer at the site level, for example two-factor authentication for WordPress. If the server already includes a firewall and bot blocking, pick a lightweight plugin that does not duplicate those functions, so you do not slow the site down.
A brochure site that rarely changes: once a day is enough. A store with orders coming in: several times a day, even hourly. Either way, keep the backup off the server, and test a restore once a quarter.
In principle, yes. When many sites share one server, a breach of one can affect others, depending on the isolation the host has set up. On a server with dedicated resources and isolation, that risk is very small.
As of November 2026, the Malware Protection add-on costs $4 per application per month for 1 to 5 applications, and less per application when you have more sites. Basic malware detection is included for free, and the add-on adds automatic cleanup and runtime protection.
Yes. Cloudflare sits in front of your server, hides its IP address, filters bots and attacks, and reduces load through caching. On Cloudways you can add Cloudflare Enterprise from $4.99 per domain per month, as of November 2026.
With the accounts: two-factor authentication at the domain registrar, in the hosting panel and in WordPress. Then update every plugin and delete the ones you do not use, and check that you have an off-server backup. Those three steps take about an hour and stop most common attacks.
Related guides
- Malware Protection on Cloudways: scanning and proactive defense
- Bot Protection on Cloudways: blocking malicious bots
- How to strengthen server and site security on Cloudways
- Wordfence vs server-level security
- My site was hacked: what to do, step by step
- Cloudways account security: 2FA and permissions
- All security guides: Cloudways security
- Full Cloudways review
Official sources: Cloudways Managed Security · Cloudways Malware Protection. Written and checked by Asael Dreyer · Updated: 7 Nov 2026
Disclosure: this is an independent site, not the official Cloudways site. Some links on this site are affiliate links: if you sign up through them we earn a commission, at no extra cost to you. Full details