← Back to blog
Security· July 27, 2026 ·3 min read

What is a WAF, and does your site really need one?

A web application firewall sounds like enterprise overkill until the day it quietly blocks the attack that would have ruined your week. Here is what a WAF does and who actually needs one.

Mads Edelskjold
Mads Edelskjold
Founder, NordicCDN · ex-datacenter CTO
What is a WAF, and does your site really need one?
The short version

A WAF (web application firewall) inspects incoming web requests and blocks the malicious ones — SQL injection, cross-site scripting, sketchy IPs and countries — before they reach your application. If your site takes any user input or handles anything you'd hate to lose, a WAF at the edge is cheap insurance.

Most people meet a WAF the way they meet their home insurance: only after something goes wrong, and usually wishing they'd set it up sooner. It's not a glamorous feature. It's the bouncer at the door who checks every request and turns away the ones carrying something nasty.

What a WAF actually inspects

A normal firewall thinks about ports and IP addresses. A web application firewall thinks about the actual content of web requests — the URLs, the headers, the form data — and looks for the patterns attackers use.

SQLi
Attempts to smuggle database commands through your forms
XSS
Scripts injected to hijack your visitors' browsers
Path tricks
Sneaky requests trying to reach files they shouldn't

The three things a WAF can do with a request

  • Allow

    Looks fine — let it through to your application as normal.

  • Block

    Matches a known attack pattern, or comes from a banned IP or country — rejected with a 403 before it touches your app.

  • Challenge

    Looks suspicious but not certainly bad — make it prove it's a real browser with a quick challenge first.

  • Rules run in order, and order matters

    A WAF evaluates rules by priority, top to bottom, and the first match wins. That's powerful but easy to get backwards: an "allow" rule placed above a "block" rule can wave through the very traffic you meant to stop.

    If your WAF "isn't blocking", check rule order first. A broad allow rule sitting above your block rules is the most common reason an attack slips through a WAF that's technically switched on.

    Edge WAF vs origin WAF

    At your originAt the edge
    Where attacks are stoppedAfter reaching your serverBefore reaching your server
    Load on your originStill pays for bad trafficBad traffic never arrives
    Works during a floodCan be overwhelmedAbsorbed across the network

    So do you need one?

    If your site is a static brochure with no forms, no logins and nothing to steal, you can probably wait. The moment you accept user input, run a login, take payments, or store anything you'd hate to leak — a WAF stops being optional. The attacks it blocks are automated and constant; they're scanning your site right now whether you've noticed or not.

    Bottom line

    A WAF reads incoming requests and blocks the malicious ones before they reach your app. Put it at the edge so bad traffic never costs you, mind your rule order so allow rules don't undermine block rules, and treat it as standard kit the moment your site does anything more than display text.

    #waf #security #owasp #firewall
    Put it into practice

    See how NordicCDN does this for your site:

    Mads Edelskjold
    Written by
    Mads Edelskjold — Founder, NordicCDN · ex-datacenter CTO

    Mads has worked in IT — mostly hosting — since he was 16. He took an early stake in a SaaS company and helped grow it through to its acquisition by Visma, has built and run data-center networks, and served as CTO of a Danish data center. He started NordicCDN to make fast, secure infrastructure simple to use.

    Make your site load instantly

    Start free in two minutes — no card required.

    Start free