A web application firewall, or WAF, is a filter that inspects web traffic to an application and blocks malicious requests. It examines incoming requests against rules that look for signs of common attacks, such as attempts to inject code or to abuse a known weakness, and can block, allow or flag them.

It matters because it adds a layer of defense in front of an application, and it can be updated quickly when a new attack pattern appears, sometimes before the application itself can be fixed. Many cloud providers offer one as a managed service, usually billed by rules and by requests inspected.

A WAF does not fix the flaws in an application. Attackers can sometimes change their requests to avoid the rules, and a poorly tuned one may block legitimate users or miss real attacks. Its protection also depends on where it sits and on being kept up to date.

To use one well, treat it as one layer alongside secure code and timely patching, test its rules against your real traffic, review the logs of what it blocks and check how it is billed when comparing setups across providers.