Prompt
What WAF should I use for a public API and login pages?
Latest observation
Oct 23, 2026
OpenAI APIWeb search: off
For a public API + login pages, the best WAF is usually the one that combines:
- API-aware protection
- Bot mitigation
- Managed rules for OWASP / common exploits
- Rate limiting / abuse controls
- Good support for auth endpoints like
/login,/signup,/reset-password
Good choices
1) Cloudflare WAF
Best if you want an easy, strong default for public-facing apps.
Pros
- Excellent bot mitigation and DDoS protection
- Good WAF rules and rate limiting
- Easy to put in front of APIs and login pages
- Strong edge/network protections
Cons
- Some advanced features cost more
- May require tuning for API false positives
Best for: most SaaS products and public APIs.
2) AWS WAF
Best if your stack is already on AWS.
Pros
- Integrates tightly with CloudFront, ALB, API Gateway, and AppSync
- Flexible rule creation
- Good fit for AWS-native architectures
Cons
- Can be more complex to configure well
- Bot protection is less “turnkey” than Cloudflare unless you add more services
Best for: AWS-heavy environments.
3) Fastly Next-Gen WAF / F5 Distributed Cloud WAAP
Best for larger/enterprise setups with more tuning needs.
Pros
- Strong enterprise-grade controls
- Good for complex traffic patterns
- Can handle sophisticated app security requirements
Cons
- More operational overhead
- Usually more expensive
Best for: enterprise or high-scale environments.
4) Akamai WAF / WAAP
Best for very large public applications needing top-tier edge security.
Pros
- Very mature security platform
- Strong bot and attack protection
- Excellent global edge performance
Cons
- Complexity and cost
- Often overkill for smaller teams
Best for: large-scale, high-risk public services.
My practical recommendation
If you want a simple answer:
- Choose Cloudflare if you want the best balance of ease, protection, and public internet exposure.
- Choose AWS WAF if you’re already deeply on AWS and want to keep everything native.
- Choose Akamai/F5/Fastly if you have enterprise needs, dedicated security staff, or very high traffic/risk.
For login pages specifically, make sure the WAF supports:
- Bot detection
- Credential stuffing protection
- Rate limits by IP, ASN, geo, and account
- Challenge/CAPTCHA on suspicious traffic
- Allowlisting for trusted clients
- Protection for password reset and MFA endpoints
For public APIs, make sure it supports:
- Per-route rules (
/auth,/token,/v1/*) - Schema/JSON inspection if possible
- Header validation
- Strict rate limiting per API key/user/IP
- JWT-aware or token-aware controls
- Protection against abuse, scraping, and enumeration
Short version
- Best overall: Cloudflare
- Best AWS-native: AWS WAF
- Best enterprise: Akamai or F5
If you want, I can also give you a WAF selection matrix based on your cloud, traffic volume, and budget.