Creating A Records for Localhost

dns-hostingdomain-name-system

What's the best practice when creating A records that point to localhost? Is it considered taboo or are there some valid cases where it's permissible?

I have a dozen domains where I setup "local." subdomains that point to 127.0.0.1 to help when locally developing web applications linked to those domains. Myself and other developers on my team often have to work with multiple sites on our localhosts, and referring to IPs in the URL or keeping a local map of domains in your hosts file tends to cause confusion and gets difficult to maintain over time.

So I thought registering these as subdomains would be a quick and easy way to provide shortcuts for everyone. And it did. It worked for a few weeks, then it suddenly stopped working. So I logged into my provider's DNS controls, and sure enough, all the "local." A records had been deleted.

My host is Godaddy.

Before I go nuclear on Godaddy for modifying my DNS records without my permission, is there a legitimate reason why they would have deleted them? Might they have thought it was some sort of security issue or violation? Godaddy's just a terrible company in general, but switching DNS providers isn't a chore that's high on my list. Is this something that I should be legitimately angry about?

Best Answer

Although maybe a little odd, I don't know of any specific standard or specification that prohibits doing such a thing within public DNS in general. There could possibly be some quirk of the GoDaddy platform that causes some sort of issue when using loopback addresses, or perhaps it was removed just because it's 'non-standard' or 'odd'.

If the machines are all on the same network and don't leave it, then could you perhaps create these records on your internal DNS?

Related Topic