Using a parameter instead of IP address in DNS

Is there a way to set up a parameter name for an ip address and use that when setting up dns for domains, say for the A record? kinda like ip lists that’s already available.

reason, have a bunch of domains that use the same ip and if/when that changes, would need to visit dns pages for every domain to edit the ip instead of making the change in one place and having it propagate down.

maybe there are some api calls to modify dns records, but we may not want to go that route yet.

That’s what CNAMEs are for. I believe they work across domains within the same account.

So your main site ( would have an “A” record for

And every other record would be a CNAME that points to

sure, i considered cname but doesn’t that break some rfc rules? as in having a cname for root domain while there’s an soa record for it.

maybe the old rule no longer matters or at least not enforced. was somewhat concerned about what if we wanted to migrate the domains elsewhere and we export the zones and they’re not fully dns rfc compliant.

The CNAME does not play nice with SOA, MX, TXT, and any other important records at the root. Some DNS providers have workarounds, though. With Cloudflare, there is a setting called “CNAME Flattening” on the DNS page. Depending on how you have configured it, Cloudflare can resolve everything internally and return the IP address to the client, meaning it looks like a normal A record to an external observer. This is especially important at the root.

1 Like

aha, looks like cname flattening handles the rfc issue behind the scene and it’s active for root by default. kinda bizarre that this can be done but also helpful.

a drawback is exporting the zone also yields the cname instead of resolving for ip, but not a huge deal.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.