Cloudflare Docs
Learning Paths
Visit Learning Paths on GitHub
Set theme to dark (⇧+D)

Create an allowlist or blocklist

  2 min read

In the context of DNS filtering, a blocklist is a list of known harmful domains or IP addresses. An allowlist is a list of allowed domains or IP addresses, such as the domains of essential corporate applications.

Gateway supports creating lists of URLs, hostnames, or other entries to reference in your policies.

You can create a list by:

​​ Create a list from a CSV file

Here is a sample CSV file of URLs that you can use for testing. When formatting the CSV:

  • Each line should be a single entry.
  • Trailing whitespaces are not allowed.
  • CRLF (Windows) and LF (Unix) line endings are valid.

To upload the list to Zero Trust:

  1. In Zero Trust, go to My Team > Lists.
  2. Select Upload CSV.
  3. Next, specify a List name, enter an optional description, and choose a List type.
  4. Drag and drop a file into the CSV file window, or select a file.
  5. Select Create.

You can now use this list in the policy builder by choosing the in list operator.

​​ Create a manual list

  1. In Zero Trust, go to My Team > Lists.
  2. Select Create manual list.
  3. Next, specify a List name, enter an optional description, and choose a List type.
  4. Enter your list element manually into the Add entry field and select Add.
  5. Select Save.

You can now use this list in the policy builder by choosing the in list operator.

​​ Example policy

Selector Operator Value Action
Domain in list Corporate domains Allow