Cloudflare offers a nifty shortcut for split DNS situation. Company may share the same domain name for their public and internal domain. In the internal domain, some subdomains can point to internal IP address that are not available on public DNS records. Due to separation of DNS nameserver, DNS admin often need to replicate any creation of public subdomains into internal nameserver including subsequent update of values.
Instead of replicating every public DNS records (A/AAAA/CNAME/MX/TXT/etc) of a subdomain, simply create a CNAME record that point to <fqdn>.cdn.cloudflare.net in the internal nameserver. This works with subdomains that have proxy mode enabled and also those without.
Internal nameserver:
| Domain | Type | Value |
|---|---|---|
a.example.com | CNAME | a.example.com.cdn.cloudflare.net |
However, this CNAME shortcut does not support subdomain that NS to third-party DNS provider, even with CNAME flattening enabled. In the following examples, b.example.com.cdn.cloudflare.net does not return any record.
Cloudflare DNS:
| Domain | Type | Value |
|---|---|---|
b.example.com | NS | ns-xx.awsdns-xx.com |
| Domain | Type | Value |
|---|---|---|
b.example.com | CNAME | b.z.example.com |
z.example.com | NS | b1.example.com |
b1.example.com | A | x.x.x.x |