I'm wondering if it's possible to alias one domain for another at the server configuration level in a similar way that you can alias a domain to an IP address in the /etc/hosts file.
This is on a flavor of RedHat Linux.
I thought this would be simple to do but unfortunately I couldn't find where to configure this.
As an example: I would like to be able to add an alias db.myapp.com to an actual DNS db.rds.amazonaws.com
To give some context, I want to use a consistent name in my application. The DB details change depending on the server the component is running on (e.g. regional differences). The DB DNS entries don't change names but the underlying IP addresses are prone to change so this is why mapping to IP address in /etc/hosts is not reliable.
I'd appreciate any advice
Thanks,