Guide
Website firewall explained: what a web application firewall does
A website firewall, or web application firewall, inspects the requests sent to your site and blocks those that look like attacks, before they reach your pages and database. It stops common threats such as SQL injection and automated probes, but it cannot fix a vulnerable plug-in on its own. A firewall at the hosting level, like the ModSecurity firewall on our plans, works alongside updates and strong passwords.
The basics
What a firewall is, in plain words
A firewall is a gatekeeper. It looks at traffic trying to reach your site and decides whether to let it through. Some firewalls work at the network level, blocking traffic to ports that should not be open. A web application firewall, or WAF, works at a higher level and understands web requests.
It reads what each visitor is asking for and compares it with rules describing known attacks. A request that tries to slip database commands into a form field, for example, or that probes for a well-known vulnerable file, is recognised and refused. Normal visitors never notice it.
Think of it as a security guard who knows the faces of common troublemakers and the tricks they use. It cannot spot a brand new trick, and it cannot repair the building, but it stops a great deal of everyday trouble at the door.
Types
Where a firewall can sit
| Type | Where it works | Strengths | Limits |
|---|---|---|---|
| Server-level WAF, such as ModSecurity | On the web server, in front of your site | Protects every site on the account, with no plug-in to maintain | Rules are set by the host |
| Plug-in firewall | Inside WordPress, after the request arrives | Easy to configure per site | Uses site resources and runs after some code has loaded |
| Cloud or DNS firewall | In front of your host, as a proxy | Can absorb large attacks and filter bad traffic first | Adds another service to manage |
| Network firewall | At the edge of the data centre | Blocks unwanted ports and some floods | Does not understand web attacks in detail |
What it blocks
Threats a WAF helps with
SQL injection
Attempts to trick your database into running an attacker’s commands through a form or address.
Cross-site scripting
Attempts to insert harmful scripts into pages that other visitors will see.
Probing and scanning
Bots that look for known vulnerable files and plug-ins across thousands of sites.
Brute force logins
Repeated password guesses against your login page.
Bad bots and floods
Abusive traffic that wastes resources and slows the site.
Known exploit patterns
Requests that match the signatures of recently discovered attacks.
Worked example
A worked example: a blocked probe
Dan runs a small WordPress site for his plumbing business. One night an automated bot starts requesting hundreds of addresses on his site, each one a known path to a vulnerable file in an old plug-in. Dan does not even use that plug-in, but the bot does not know that.
The ModSecurity firewall on his hosting account recognises the pattern and blocks the requests, returning an error to the bot. Dan’s site is never slowed, and his pages are never touched. He finds out only because a weekly security report lists the blocked attempts.
Later that month, a real vulnerability is announced in a plug-in he does use. The firewall might block some attempts to exploit it, but Dan does not rely on it. He updates the plug-in the same day. The firewall bought him time. The update fixed the real problem.
Limits
What a firewall cannot do
A firewall is a layer, not a cure. It cannot fix a vulnerable plug-in, a weak password or a compromised computer. If an attacker has a valid password, the firewall sees a normal login. If a plug-in has a flaw the rules do not yet cover, the attack may get through.
It can also block good traffic by mistake, which is called a false positive. A form that includes unusual text, or an editor saving a long post, can trigger a rule. If a legitimate action is blocked, tell your host. We can check the logs and adjust.
So treat the firewall as one part of a set of layers that also includes updates, strong passwords, two-factor sign-in, malware scanning and tested backups. Our website security checklist puts them together.
On our plans
What is included with our hosting
Every plan includes a ModSecurity web application firewall, Imunify360 for malware scanning and protection, DDoS protection and CloudLinux isolation between accounts. Free SSL encrypts traffic between visitors and your site. You do not need to install anything to get these layers.
You can add a plug-in firewall if you want extra controls inside WordPress, but avoid running two firewalls that duplicate each other, as they can conflict and slow the site. If you are unsure, ask our live chat what is already in place.
See our page on web hosting security for a full list, and what a DDoS attack is for how floods are handled.
Checklist
Using a firewall well
- A server-level firewall is active on your hosting
- You do not run two overlapping plug-in firewalls
- You still update WordPress, plug-ins and themes
- You use strong passwords and two-factor sign-in
- You review security reports now and then
- You tell your host if real actions are blocked
- You keep tested backups
- You use free SSL on every page
Choosing
Do you need to do anything?
For most small business sites on a good host, the answer is simple: the main protection is already in place. A server-level firewall protects your account without any set-up, and your job is to keep the software behind your site updated and your logins strong.
Where you might add something is a site that holds more risk, such as a shop, a members area or a site that handles personal data. A cloud firewall in front of the site, or a security plug-in with login protection, can add useful extra controls. Choose one, test it, and make sure it does not clash with what your host already provides.
If you are unsure, ask our live chat what is active on your account and what an extra layer would add. A short conversation often saves you installing something you do not need.
Security layers on every plan
Imunify360, a ModSecurity firewall, DDoS protection, free SSL and weekly remote backups, from 84p a month (£10.03 billed yearly).
FAQ
Common questions
What is a web application firewall?
A firewall that inspects web requests to your site and blocks those that look like attacks, before they reach your pages or database.
Do I need a firewall plug-in if my host has one?
Usually not. A server-level firewall already protects the site, and a second one can conflict. Ask your host what is in place.
Can a firewall stop all hacks?
No. It stops many common attacks, but it cannot fix outdated software, weak passwords or stolen logins.
Will a firewall slow my site?
A well-run server-level firewall adds almost no delay. Heavy plug-in firewalls can use more resources.
Why was my form blocked?
A rule may have mistaken your content for an attack. Contact support so the logs can be checked and the rule adjusted.
What is ModSecurity?
A widely used open-source web application firewall engine that applies rules to block malicious requests at the server.
Is a firewall the same as antivirus?
No. A firewall filters traffic coming in. Antivirus and malware scanners look for harmful files already on the server.
Does the firewall protect against DDoS?
It helps with some abusive traffic. Large floods are handled by separate DDoS protection, which our plans also include.
Keep reading
Related pages
Host your site with security built in
Imunify360, a firewall and free SSL on every plan, with a 15-day money-back guarantee.