-
Notifications
You must be signed in to change notification settings - Fork 492
Should we support ALIAS records? #50
Description
Some providers support an ALIAS or ANAME record type that acts like a CNAME, but converts it dynamically to an A or AAAA record at dns request time.
The primary use case I believe is allowing a CNAME type record at the zone apex where it is not usually allowed.
R53, DME, and DNSimple, and CF support them natively, while others do not at the moment.
Proposal:
-
Add an
ALIAS( name, aliasDomain)record type. -
Add some mechanism for a provider to indicate it supports these records (perhaps by implementing
interface { SupportsAlias() bool }). -
At validation time, check if you use
ALIASrecords with a non-supporting provider, and error if so. -
Potentially add some "override" metadata, to resolve the name at "compile time" and use that A and/or AAAA records instead for non-supporting providers. This would be a one-time lookup, but could still "work" in a way. Perhaps you run dnsconrtol on a cron job to keep it updated it or something. I would want to use something like
ALIAS("@", "otherdomain.com", { lookup_on_build: true})to make sure you are really ok with that behaviour. (name negotiable).
Concerns:
-
Inconsistent experience if using some supporting providers and some non-supporting. Dual host setups could end up with divergent zones.
-
Is this feature even needed? I do think CNAME apex records could be valuable, but don't want to do it if nobody will use it.
-
Is "compile time" lookup a horrible idea in general?