Cloudflare Docs
Cloudflare Zero Trust
Visit Cloudflare Zero Trust on GitHub
Set theme to dark (⇧+D)

Build a custom profile

With Cloudflare DLP, you can build custom DLP profiles specific to your data, organization, and risk tolerance.

You can add both custom and existing detection entries to a custom DLP profile. Existing entries include predefined profiles and integration profiles.

​​ Create a custom profile

To define a custom profile:

  1. In Zero Trust, go to Gateway > DLP Profiles.

  2. Select Create Profile.

  3. Enter a name and optional description for the profile.

  4. Add custom or existing detection entries.

    Add a custom entry
    1. Select Add custom entry and give it a name.

    2. In Value, enter a regular expression (or regex) that defines the text pattern you want to detect. For example, test\d\d will detect the word test followed by 2 digits.

      • Regexes are written in Rust. We recommend validating your regex with Rustexp.
      • Detected text patterns are limited to 1024 bytes in length.
      • Regexes with + are not supported as they are prone to exceeding the length limit. For example a+ can detect an infinite number of a’s. We recommend using a{min,max} instead, such as a{1,1024}.
    3. To save the detection entry, select Done.

    Add existing entries
    1. Select Add existing entries. Choose which entries to want to add, then select Confirm.
    2. To save the detection entry, select Done.
  5. (Optional) Configure Advanced settings for the profile.

  6. Select Save profile.

Next, create a DLP policy to log or block HTTP requests that match this profile.