I have a subdomain on domain.com and am using A records to point to some IP addresses associated with a github pages site.
I am moving my hosting away from github pages to another provider. This provider suggests using a CNAME to configure the DNS.
In an effort to avoid downtime I am trying to find the best way to make the change.
Should I add the new CNAME and leave the A records in place? I could then delete the A records once the CNAME resolves.
Or should I add the new CNAME and delete the A records?
A
record when you say@
record?@
refers to the main, subdomainless, naked domain, e.g.example.com
and notwww.example.com
orsubdomain.example.com
. So by definition you cannot have an "@
record" on a subdomain, because@
quite literally means "not on a subdomain".A
record to aCNAME
record for a particular subdomain and@
is not actually relevant to the question, then note thatA
andCNAME
records set for the same subdomain will conflict with each other, so you'll have to remove theA
record before adding theCNAME
record. This should cause minimal downtime, though if theA
record had a high TTL, then you may be waiting for a while before all clients update their DNS records and start hitting the new server instead of the old one. You can mitigate this by lowering the TTL of theA
record and waiting.