Skip to content
Cloudflare Docs

Get started

Follow this guide to get started with Internal DNS.

Before you begin

API token configuration

Permissions

  • Account - DNS Views - Edit
  • Zone - DNS - Edit
  • Account - Account Settings - Edit
  • Zone - DNS Settings - Edit
  • Zone - Zone - Edit

Account Resources

  • Include - (Your account)

Zone Resources

  • Include - All zones

1. Set up your internal DNS zone

(Dash instructions)

(Optional) Reference a zone from another zone

(Dash instructions)

Since the resolver policy will require a DNS view, you must have at least one view to be able to route requests to internal zones.

(Dash instructions)

3. Configure Gateway policies

Besides selecting an internal DNS view when setting up your resolver policies, you can also enable the fallback through public DNS option.

  1. In Zero Trust, go to Gateway > Resolver policies.
  2. Select Add a policy and enter a name and description.
  3. Create an expression for the traffic you wish to route. For guidance about selectors, operators, and values, refer to Gateway.
  4. Select Use DNS view. In the dropdown, choose the view that queries matching the expression should be sent to.
  5. (Optional) Adjust the option to fallback through public DNS according to your use case.
  • Off: Gateway DNS resolver returns the response as-is to the client.
  • On: In case the response from the internal zone is REFUSED, NXDOMAIN, or a response with a CNAME type, Gateway DNS resolver sends the query to Cloudflare 1.1.1.1 public resolver and tries to resolve the query via public DNS.
  1. Select Create policy to confirm.