I am developing a tool using Workers and am having success thus far.
As I need to be able to get only IPv4 or IPv6 answers, I’ve had to create two sets of unproxied subdomain that contain only A or AAAA records. The IP addresses were obtained by digging against myworker-myworkers-workers-dev (I’ve had to replace dots with hyphens due to being a new Community user).
This is how my DNS management dashboard looks at the moment:
Type Name Content TTL Proxy Status A ipv4 22.214.171.124 Auto DNS only A ipv4 126.96.36.199 Auto DNS only AAAA ipv6 2606:4700:3035::ac43:cb16 Auto DNS only AAAA ipv6 2606:4700:3030::6815:528f Auto DNS only CNAME mydomain-com myworker-myworkers-workers-dev Auto Proxied CNAME www myworker-myworkers-workers-dev Auto Proxied
All my Workers’ Routes are set up and everything is functioning as expected.
However, I’m trying to understand what’s going on with the associated DNS records and have a number of questions to hopefully avoid any pitfalls further down the line:
- Why, when I dig against proxied and flattened CNAME root (mydomain-com) or the proxied CNAME (www), do I get different IP addresses returned than when I dig against myworker-myworkers-workers-dev? As they’re both aliases of myworker-myworkers-workers-dev, I was expecting to see them resolve to the same IP addresses.
dig A mydomain-com +short 188.8.131.52 184.108.40.206 dig A myworker-myworkers-workers-dev +short 220.127.116.11 18.104.22.168
Is it better to have DNS only subdomains resolve to the IP addresses resolved by mydomain-com/www-mydomain-com or myworker-myworkers-workers-dev?
Are the IP addresses in either the proxied responses for mydomain-com or www-mydomain-com or the responses for myworker-myworkers-workers-dev ever subject to change and if so, how often?
Rather than employ some automation to track the changes and update - if that is necessary (dependent on the answer to question 3 above) - do Cloudflare offer an alternative product or service that provide either IPv4-only or IPv6-only responses?
Are the IPs returned in any of the responses (IPv4 or IPv6) for either mydomain-com or myworker-myworkers-workers-dev all anycast addresses and always the same regardless of location?