I manage multiple websites that currently have the following DNS configuration:
example.com - A Record - Production Server IP
test.example.com - A Record - Test Server IP
www.example.com - CNAME - example.com
beta.example.com - CNAME - test.example.com
dev.example.com - CNAME - test.example.com
Is this an appropriate use of CNAME records? I've looked online and have not found a clear answer. Some people claim that CNAME records are bad (they are not, however, clear on why this is) and propose the following setup:
example.com - A Record - Production Server IP
test.example.com - A Record - Test Server IP
www.example.com - A Record - Production Server IP
beta.example.com - A Record - Test Server IP
dev.example.com - A Record - Test Server IP
Which one of these is the better approach (and why)?
Note: The subdomains do not require their own MX records, so that is not an issue here.