I have a number of domains that I'm hosting on my web server, so I've edited their A record to point to my server's IP address. Occasionally I have to change the server's IP address, which means I have to edit the A record for each domain hosted on that server. There's also risk that a website would go down because the change was not made for its A record.
I'd like to simplify this if possible. Is there a way I could set the A record to a domain or subdomain, then set that domain/subdomain to the desired IP, so that when the IP changes, I would need to change only 1 location instead of multiple domains? I'm open to ideas. It does not have to be exactly this way through the A record. Anything that gets me the desired effect is fine.
The DNS RR you need to learn about is called CNAME.
It sounds like you have configured A records to point to the 'www' subdomain of your domains. Instead, you should configure your root domain (the example.com instead of www.example.com) to have an A record with the actual IP of the server. You should then configure CNAMEs that point to example.com for each subdomain.
Here is what you would want your records to look like:
Edit
Thanks to ajdle for pointing out the missing dot at the end, making the record fully qualified. Otherwise, DNS would think it was relative to your root domain and attempt to add it's
search
path to the record, which could result in an attempt to resolve 'example.com.example.com' - see this discussion about the difference between 'example.com' and 'example.com.'.