I did want add a subdomain to one of my domains at CF. So I did some research and found an articel telling that you should do this vis “CNAME” entry like CNAME / subdomain / IP address. My VPS hoster’s tech support now told me this is not correct way, instead I shall add this as a “A” record and “never” as CNAME.
Now I’m somewhat confused. What is the correct way?
In this case, your VPS hoster is correct. You should add the name of your subdomain with an A record, and point it to the IP of your VPS.
Hope it helps!
Both options are valid. Which one is the correct one depends on your use case and your expectations.
A CNAME contains an alias that resolves to a canonical name. When you proxy a CNAME through Cloudflare you will not see a CNAME published. An A and a AAAA record that point to Cloudflare will be published in its place.
If you have multiple services that you intend to always run on the same host, a CNAME can reduce maintenance overhead if you need to renumber that host. You would only need to update the A record for the canonical name.
With the exception of DNSSEC records, a CNAME cannot have any other records at the same location. This means a CNAME won’t work when you need another record type with the same name. The services listening on the host at the canonical name may need to know the alias you used in your CNAME.
Thanks a lot for explain this in detail!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.