Skip to content

DNS records

When you create a tunnel, Cloudflare generates a subdomain of cfargotunnel.com with the UUID of the created tunnel. You can treat <UUID>.cfargotunnel.com as if it were an origin target in the Cloudflare dashboard.

Unlike publicly routable IP addresses, the subdomain will only proxy traffic for a DNS record in the same Cloudflare account. If someone discovers your subdomain UUID, they will not be able to create a DNS record in another account or system to proxy traffic to the address.

Create a DNS record for the tunnel

To create a new DNS record for your tunnel:

  1. Log in to the Cloudflare dashboard and select your account and domain.
  2. Go to DNS > Records.
  3. Select Add record.
  4. Input the following information:
    • Type: CNAME
    • Name: Subdomain of your application
    • IPv4 address: <UUID>.cfargotunnel.com
  5. Select Save.

Example of fields completed to create a new CNAME record.

The DNS record is distinct from the state of the tunnel. You can create DNS records that point to a tunnel that is not currently running. If the tunnel stops running, the DNS record will not be deleted. If you point the DNS record to a tunnel not currently running, visitors will see a 1016 error message.

Additionally, you can create multiple DNS records that point to the same tunnel subdomain. If you are routing traffic from multiple hostnames to multiple services, you will need to create a CNAME entry for each hostname. The CNAME entries will share the same target.

Optional Cloudflare settings

The application will default to the Cloudflare settings of the hostname in your account that includes the Cloudflare Tunnel DNS record, including cache rules and firewall policies. You can changes these settings for your hostname in Cloudflare's dashboard.