Gateway
A safety filter for everything your devices try to reach — blocks malware, phishing, and unwanted sites.
What is Gateway?
Cloudflare Gateway is a Secure Web Gateway (SWG): it inspects the traffic leaving your devices and decides what's allowed out. It blocks dangerous or unwanted destinations before a connection is ever made.
While a WAF protects traffic coming into your website, Gateway protects traffic going out from your people and devices — like a filter for your whole team's or family's internet use.
Think of it like…
A water filter on your tap. Every drop (request) passes through it; clean water flows, but contaminants (malware, phishing, blocked categories) get caught before reaching the glass.
Three filtering layers
Gateway can filter at three depths. You can start with just DNS (the easiest) and add the deeper layers later.
DNS filtering
The fastest layer. When a device asks 'what's the IP of this domain?', Gateway can refuse to answer for bad domains — blocking them before they load. Sees domain names, not full URLs.
Network filtering
Inspects raw packets by IP, port, and protocol. Useful for non-web services like SSH or RDP.
HTTP filtering
The deepest layer. Inspects full URLs, uploads, and downloads — even inside HTTPS — to scan for malware or data leaks. Needs a certificate installed on devices.
Why use it?
Block malware & phishing
Stops devices from reaching known-malicious or scam sites organization-wide.
Content control
Block whole categories — adult content, gambling — for schools, families, or offices.
Stop data leaks
Prevent uploading confidential files to personal cloud storage.
Works anywhere
With the WARP client, protection follows remote and travelling employees.
How to set it up
First you decide how traffic reaches Gateway, then you write policies. Here's the quickest path: block malware via a DNS policy.
Choose how to connect
Two options. WARP client: install Cloudflare's app on devices — enables all three layers plus identity. DNS location: point your network's DNS to Cloudflare — simplest, DNS filtering only.
Open Gateway policies
In the Zero Trust dashboard go to Gateway → Firewall policies → DNS, then Add a policy.
Block security threats
Set a condition matching the Security threats categories, choose action Block, and save. It deploys worldwide in under a minute.
Selector: Security Categories Operator: in Value: Malware, Phishing, Command & Control Action: BlockAdd a content policy (optional)
Add another DNS policy matching Content Categories (e.g. Adult Themes) with action Block to filter unwanted content.
Review the logs
Open Logs → Gateway to see which domains were queried and blocked, then tune policies that are too strict.
Key concepts
Secure Web Gateway
A security checkpoint all outbound traffic passes through to be filtered.
Policy
An if-this-then-that rule. Conditions match traffic; actions allow, block, or override.
Categories
Cloudflare groups domains (malware, gambling, social media) so you filter by type, not one by one.
WARP client
Cloudflare's device app that sends traffic to Gateway and unlocks network + HTTP filtering.
DNS location
A network whose DNS points at Cloudflare; the no-install way to get DNS filtering.
TLS decryption
Lets HTTP filtering look inside encrypted traffic. Requires installing Cloudflare's certificate.
Tips & billing
Start with DNS-only
DNS filtering needs no software install and blocks the vast majority of malware and phishing for quick wins. Add the WARP client later when you want network and HTTP filtering.
- Gateway is part of Cloudflare Zero Trust; the free plan covers up to 50 users.
- Policies are evaluated in order: DNS first, then network, then HTTP.
- Changes deploy globally in under a minute.
- HTTP filtering (inspecting inside HTTPS) requires installing Cloudflare's certificate on devices.
Related products
menu_bookOfficial docsopen_in_new