Skip to content
Cloudflare Docs

Common policies

The following policies are commonly used to secure DNS traffic.

Refer to the DNS policies page for a comprehensive list of other selectors, operators, and actions.

Allow corporate domains

This policy allows users to access official corporate domains. By deploying the policy with high order of precedence, you ensure that employees can access trusted domains even if they fall under a blocked category like Newly seen domains or Login pages.

SelectorOperatorValueActionPrecedence
Domainin listAllowed domainsAllow1

Block security threats

Block security categories such as Command & Control, Botnet and Malware based on Cloudflare's threat intelligence.

SelectorOperatorValueAction
Security CategoriesinAll security risksBlock

Block content categories

The categories included in this policy are not always a security threat, but blocking them can help minimize the risk that your organization is exposed to. For more information, refer to domain categories.

SelectorOperatorValueAction
Content CategoriesinQuestionable Content, Security Risks, MiscellaneousBlock

Block a dynamic list of categories

You can add a list of category IDs to the EDNS header of a request sent to Gateway as a JSON object using OPT code 65050. For example:

{
"categories": [2, 67, 125, 133]
}

With the Request Context Categories selector, you can block the category IDs sent with EDNS. This is useful to filter by categories not known at the time of creating a policy, or to enforce device-specific DNS content filtering without reaching your account limit. When Gateway uses this selector to block a DNS query, the request will return an Extended DNS Error (EDE) Code 15 - Blocked error, along with a field containing an array of the matched categories.

SelectorOperatorValueAction
Request Context CategoryisPresentBlock

Block unauthorized applications

To minimize the risk of shadow IT, some organizations choose to limit their users' access to certain web-based tools and applications. For example, the following policy blocks known AI tools:

SelectorOperatorValueAction
ApplicationinArtificial IntelligenceBlock

Block banned countries