We are hosting many web applications for our customers. As is obvious they want to use their own domains to refer to those applications, usually they want that any user that either type http://www.customer1.example
or http://customer1.example
goes to their web application.
The situation we are facing is that we need to have the flexibility to change IP addresses in the near future. And we don't want to rely on the customer doing the A record change on their domains. So we thought that using CNAME
records will work, but as we find out CNAME
records will not work for the root domain.
Basically:
customer1.example IN CNAME customer1.mycompanydomain.example //this is invalid as the RFC
www.customer1.example IN CNAME customer1.mycompanydomain.example //this is valid and will work
We want to be able to change the IP address of customer1.mycompanydomain.example
or the A
record and our customers will follow this record which we have control over.
in our DNS it will look like:
customer1.mycompanydomain.example IN A 192.0.2.1
Any ideas?