In this guide: Web application firewalls (WAF) explained: what a WAF is, how it blocks attacks, cloud WAF vs plugin WAF, setting one up, and limitations to know.
A regular network firewall decides which ports and IP addresses can reach your server. A Web Application Firewall (WAF) goes deeper: it inspects the actual HTTP requests to your website and can log, challenge or block matching requests at the point where the product is deployed.
A WAF sits between visitors and your website and filters traffic based on rules. It understands web requests: URLs, parameters, cookies, headers, and form data.
It protects against common web attacks, such as:
Many of these attacks target the vulnerabilities listed in the OWASP Top 10, a widely used list of critical web application security risks.
WAFs use several techniques:
Actions include block, challenge, log only, or allow.
Cloud WAF (e.g., Cloudflare, Sucuri Firewall, other CDN-based WAFs)
Plugin/endpoint WAF (e.g., Wordfence)
Server/host WAF (e.g., ModSecurity, Imunify360)
Many sites use layers: a cloud WAF for broad protection and DDoS mitigation, plus a WordPress security plugin for login security and scanning. See Best WordPress Security Plugins Compared.
Cloud WAF (Cloudflare example):
/wp-login.php from outside your countries, or block access to xmlrpc.php if unused.Plugin WAF (Wordfence example):
After setup:
A WAF is powerful, but it’s not a complete security strategy:
Combine a WAF with the rest of the WordPress Security Checklist.
Further reading: OWASP Top 10 web security risks
Draw the request path before choosing rules: visitor, DNS, proxy, load balancer, web server and application. Identify where encrypted traffic is terminated and where the product can inspect the request. An edge service cannot evaluate an HTTP request that bypasses its network. An application firewall running at the origin uses that origin’s resources. These distinctions determine what a successful deployment can actually protect.
The Cloudflare WAF concepts documentation describes request filtering through rulesets. Use that as a product-specific reference, not proof that every vendor processes traffic in the same order. Record which hostnames and routes are covered, including a separate API or checkout hostname. An attractive dashboard for the main domain does not establish coverage for every related service.
List important business journeys and the systems that call them. A WordPress site may have browser visits, editor saves, REST API requests, payment callbacks, uptime checks and scheduled integrations. Some clients can answer a browser challenge; an automated webhook usually cannot. Treat these as different request types instead of applying one action to every route. Involve the person responsible for each integration before changing its access path.
Create a short acceptance checklist using test accounts and supported sandbox services. Include a normal article view, a mobile form submission, an authenticated editor save and a test callback where available. Record the expected response and who verifies it. Do not send fake transactions to production payment services simply to see whether a firewall rule blocks them. The purpose is controlled validation, not an unapproved load or penetration test.
Logging, challenging and blocking have different consequences. A logging stage can help identify a likely false positive, but only use a mode actually supported by the plan and rule type. A browser challenge can frustrate legitimate visitors or break machine clients. Blocking may be appropriate for a confirmed unwanted pattern, but it should have an owner and a rollback route if important functionality is affected.
Begin with a small, understood change rather than a large collection of copied expressions. Write the intended condition in plain English, then compare the expression with that intention. If a rule is meant for one login path, verify that it does not accidentally match every request whose URL contains a similar word. Ask another authorized administrator to review a high-impact rule before it controls a revenue-critical endpoint.
A request may pass through several security phases. An earlier terminal action can mean that later rules never evaluate it. Therefore, the absence of a later rule’s event does not always mean the request was allowed. Review the provider’s current execution model before diagnosing apparently inconsistent outcomes. Keep the exact event identifier, action and rule version with the incident notes so another administrator can reproduce the investigation.
The managed rules documentation is the appropriate reference for Cloudflare’s current behavior. Other products have their own ordering and limits. Ask about body inspection size, supported content types and handling of oversized requests. A request accepted outside an inspection limit is not the same as a request whose entire payload has been examined and found safe.
When a legitimate action fails, reproduce the smallest safe example and correlate its time with the security event. Capture the hostname, path, action and rule identifier without publishing session cookies or customer data. Check whether the failure actually came from the firewall rather than an application error or a different proxy. A generic access-denied page by itself is not enough to identify the responsible control.
Prefer a narrowly scoped exception to disabling an entire ruleset. For example, an authenticated content-saving route may need a specific adjustment after its request has been reviewed. That does not justify skipping all checks on the whole administration area. Document the reason, scope, owner and review date for each exception. Remove temporary troubleshooting exemptions when the investigation ends, and test that the intended protection still applies elsewhere.
Protecting an origin involves more than hiding its address. Review how the provider authenticates or restricts upstream traffic and how legitimate monitoring or administrative access is maintained. An origin restriction applied without planning can block the proxy itself, renewals, health checks or staff access. Have a qualified administrator implement the documented method with a recovery path rather than copying a broad firewall command from an unrelated tutorial.
Remember that a published IP address is not proof that an application is presently exploitable. It is evidence to assess within the actual network design. Check alternate DNS records, old hostnames and direct paths only within systems you own or are authorized to test. Keep a current diagram alongside the server isolation review so application filtering is not confused with account or operating-system isolation.
A login endpoint, public article and expensive search function do not have identical traffic patterns. Choose rate controls based on observed legitimate use and the product’s supported counting characteristics. A shared office or mobile network may put many people behind one address. A simple per-IP threshold can therefore affect ordinary users, while a distributed attack may stay below it at each individual address.
Record the counting period, matching condition and action for a proposed limit. Validate important clients and watch for unexpected failures after rollout. Do not label every burst a malicious attack without evidence. A campaign, a monitoring configuration error or a crawler may explain increased requests. Rate limiting can reduce certain abuse patterns; it does not provide a universal guarantee of availability during every application or network incident.
A managed rule may block a known exploit pattern while the underlying software remains vulnerable. Keep the normal remediation plan: identify the affected component, assess the supported update or replacement and verify the result. Do not leave an abandoned plugin installed indefinitely merely because a rule description mentions its vulnerability. The rule may not cover every exploit variation or every way traffic reaches the application.
Coordinate changes through the WordPress update process and keep verified automatic backups available for recovery. A firewall is neither a backup nor a malware-removal service. If compromise is suspected, investigate existing files, accounts and configuration separately. Blocking new requests does not remove a malicious scheduled task or reverse changes already made to the database.
Security event totals count events according to the vendor’s definitions. They do not directly measure unique attackers, prevented breaches or recovered sales. Multiple requests can come from one client, and some blocked traffic may be benign. Report the actual metric and time window, then describe what further evidence supports your interpretation. Do not turn a large number on a dashboard into a claim that the business survived thousands of confirmed compromises.
Combine the event review with uptime, application error logs and feedback from real users. If checkout failures rise after a rule change, investigate the relationship rather than assuming stronger protection is necessarily better. The website security review checklist can help record scope and unresolved gaps. Keep sensitive logs restricted and retain them under an appropriate policy instead of posting raw request bodies in public support threads.
A useful change record contains the business reason, rule expression or identifier, intended scope, previous setting, responsible person and validation results. Include the account and plan context so the next administrator understands which controls were available. Store access through an approved team process and protect it with strong authentication. An emergency is a poor time to discover that only an absent contractor can reach the security dashboard.
Review the configuration after migrations, new forms, plugin changes and new external integrations. Re-test the important journeys rather than assuming that last quarter’s successful check covers a changed site. Keep the rollback procedure narrow: revert the recent problematic change where justified, not every protection at once. Communicate confirmed customer impact through the incident communication plan when necessary.
For a small business, the record might list a public article request, a login using a permitted test account, an editor save and a sandbox callback. For each, note the expected result, observed result, time and relevant event identifier. Mark routes that were not tested as unverified. This is a template for your own evidence, not a report that Hostreta performed these tests on your website or measured a vendor’s protection rate.
After a failed check, identify whether the condition, action or route scope needs correction. Repeat the same legitimate journey after the adjustment and confirm that unrelated routes remain protected. Ask the integration owner to sign off where appropriate. This small record is more useful than a generic statement that the WAF was enabled successfully, because it preserves what was actually checked and what still needs attention.
Promotional recommendation: if you need help reviewing a website’s security and development configuration, consider KAWEDMA’s website and hosting services. Ask for a defined scope covering your current provider, integrations, origin configuration and maintenance responsibilities. This is not a claim that every hosting plan includes a specific WAF or that KAWEDMA guarantees protection against all attacks.
Affiliate disclosure: Hostreta may earn a commission if you purchase through this link. If a hosting change is already justified by your requirements, you can compare hosting.com’s managed WordPress offering. Confirm the exact security features, support boundaries and current plan terms before buying. The referral is a hosting option, not a separately verified firewall benchmark or a substitute for application maintenance.
Escalate when the site handles sensitive transactions, the origin has an unclear network path, or a broad exception appears necessary to keep an integration working. Supply the specialist with a concise description, sanitized event identifiers and the affected business journey. Do not send live authentication cookies or administrator passwords in an ordinary support message. Agree on the permitted testing scope before any active security assessment.
A specialist review should distinguish application defects from firewall tuning and infrastructure capacity. Ask for recommendations linked to evidence, a controlled implementation plan and a way to validate the result. Keep unresolved questions visible. Purchasing a different WAF or a more expensive plan should follow a documented requirement, rather than the assumption that a higher dashboard score proves better security for your particular site.
We may earn a commission on purchases made through these links, at no extra cost to you.
Don’t miss the chance to participate in the biggest giveaway of this year.