This question already has an answer here:
- CNAME for top of domain? 3 answers
I have read on the internet that the primary record for a domain (eg example.com) should be an A record, and that bad things happen if you use a CNAME record.
I work for a web company that has several clients. Each client has their business domain (which they typically own), but I wanted to be a) able to update the server their site is hosted on without contacting them and b) have an alternate domain to access all their sites on.
The company I work for has a domain that I control, eg mycompany.com
To this end, for each client, I have created eg (client1.mycompany.com, client2.mycompany.com) records that point to our server that hosts the websites.
Now, since many clients own their own domains, I ask the clients IT person to create a CNAME record for clientdomain.com that points to client1.mycompany.com. This allows me to update the IP address that client1.mycompany.com points to without involving the clients IT person because all they have is a CNAME record that points to something I control.
This appears to work.
However, I have read that creating a CNAME record as the primary record can lead to issues with email (some of these domains have MX records but typically the client has their own mailserver). The information I read didn't really go into much detail and I didn't quite understand it.
Can someone please elaborate on why setting a CNAME record as the primary record is considered a bad idea, as it seems to work?