Custom lists

Last updated Oct 9, 2026 A custom list contains one or more items of the same type (for example, IP addresses, hostnames, or ASNs) that you can reference collectively, by name, in rule expressions.

Cloudflare supports the following custom list types:

Note

Lists with hostnames and ASNs are only available to Enterprise customers. Refer to Availability for details.

Each type has its own properties and CSV file format. Refer to the following sections for details.

For more information on lists managed by Cloudflare, such as Managed IP Lists, refer to Managed Lists.

Create a custom list

Refer to Create a list in the dashboard or to the Lists API page.

Use a custom list

Use custom lists in rule expressions with the in operator and with a field supported by the custom list:

<FIELD> in $<LIST_NAME>

The fields you can use vary according to the list item type:

List item type Available fields
IP address Fields with type IP address listed in the Fields reference
Hostname http.host
ASN ip.src.asnum

For more information and examples, refer to Use lists in expressions.


Custom list types

Lists with IP addresses (IP lists)

List items in custom lists with IP addresses must be in one of the following formats:

  • Individual IPv4 addresses
  • Individual IPv6 addresses
  • IPv4 CIDR ranges with a prefix from /8 to /32
  • IPv6 CIDR ranges with a prefix from /12 to /128

The same list can contain both individual addresses and CIDR ranges.

Cloudflare normalizes IPv6 addresses in lists. When you save a list, Cloudflare converts uppercase characters to lowercase and removes leading zeros from each segment. For example, 2400:d400:0011:19::2 is stored as 2400:d400:11:19::2. When searching list items, use the normalized form displayed in the list.

<details>

<summary>

CSV file format

</summary>

When uploading items to a custom list with IP addresses via CSV file, use the following file format (enter one item per line):

<IP_ADDRESS_1>,<DESCRIPTION>
<IP_ADDRESS_2>

The <code><DESCRIPTION></code> field is optional.

</details>

Lists with hostnames

Note

Available to Enterprise customers.

List items in custom lists with hostnames must be Fully Qualified Domain Names (FQDNs). An item may contain a * prefix/subdomain wildcard, which must be followed by a . (period). An item cannot include a scheme (for example, https://) or a URL path.

For example, the following entries would be valid for a custom list with hostnames:

  • example.com
  • api.example.com
  • *.example.com

However, example.com/path/subfolder would not be a valid entry.

You can add any valid hostname (a valid FQDN) to a custom list with hostnames. The hostnames do not need to belong to the current Cloudflare account.

<details>

<summary>

CSV file format

</summary>

When uploading items to a custom list with hostnames via CSV file, use the following file format:

<HOSTNAME_1>,<DESCRIPTION>
<HOSTNAME_2>

The <code><DESCRIPTION></code> field is optional.

</details>

Lists with ASNs

Note

Available to Enterprise customers.

List items in custom lists with autonomous system numbers (ASNs) must be integer values.

For example, the following entries would be valid for a list with ASNs:

  • 1
  • 13335
  • 64512

<details>

<summary>

CSV file format

</summary>

When uploading items to a custom list with ASNs via CSV file, use the following file format:

<ASN_1>,<DESCRIPTION>
<ASN_2>

The <code><DESCRIPTION></code> field is optional.

</details>

Was this helpful?

YesNo

On this page

Custom lists - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/waf/tools/lists/custom-lists/#page","headline":"Custom lists","description":"Create custom lists of IPs, hostnames, or ASNs for use in rules.","url":"https://developers.cloudflare.com/waf/tools/lists/custom-lists/","inLanguage":"en","image":"https://developers.cloudflare.com/waf/tools/lists/custom-lists/og.png?v=6e42a08edcac4fbb","dateModified":"2026-10-09","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Manage lists programmatically with the Lists API. title: Lists API image: https://developers.cloudflare.com/waf/tools/lists/lists-api/og.png?v=cded6b3469bab526


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/waf/llms.txt
Use this file to discover all available pages before exploring further.