I have servers named like server.prod.example.com
, and I regularly log into them as server.prod
. Recently, these hostnames started resolving to 127.0.53.53.
It turns out that ICANN recently enabled the .prod
TLD. In addition, every request that goes to the .prod
nameservers get resolved to 127.0.53.53 instead of coming back as NXDOMAIN, which would allow resolution to continue to work properly. (I'm guessing the point behind this is to let people know that their stuff will break worse before those start resolving to something real.)
How can I avoid having to type in my domain name for every host like this?
Is this still biting you occasionally? I couldn't find a list of new TLDs and when they were added, so I set one up myself: https://twitter.com/newgtldannounce
When you see internal domains suddenly resolve to
127.0.53.53
you have a namecollision and ICANN is trying to tell you that you urgently need to fix your DNS configuration.If it would return NXDOMAIN like you suggested, you are correct, it would continue to work - for now.
It would also leak your internally intended DNS query to outside parties.
Worse, in the future someone could register
server.prod
and cause you much more trouble.See here for more information https://icann.org/namecollision or run:
As to how to resolve this: Depends on the use case, I probably would just add them to
.ssh/config
with the short names. Or start using the FQDNs really.If you type in a hostname with no dots in it, DNS resolvers try to look up that hostname by first appending the configured search domains to it.
For most resolvers, if you use a hostname with at least one dot in it, the resolver first tries the hostname on its own, and falls back to appending the configured search domains.
Many resolvers have the ability to change their behavior so that they append the search domains for hostnames with dots. This is often through an option called "
ndots
" that tells the resolver how many dots the hostname must have before it tries to look up the hostname on its own first. In order to makeserver.prod
work, add this line to yourresolv.conf
:If you want to also be able to resolve server.subzone.prod, you'll have to set the option to 3, etc.
If anyone knows how to make this work in MacOS X, please let me know; changing
/etc/resolv.conf
is documented not to work (and doesn't) and I can't figure out the rightscutil
incantations.(Note: I'm hedging my bets here more than is probably warranted. I believe that the
ndots
option will work on 99% of (non-MacOSX) Unix systems.)Other answers gave you the technical solution for the problem. But noone replied to your:
So here it is.
You have various ways.
whois
, for example in your casewhois -h whois.iana.org prod | grep created
will give youcreated: 2014-08-23