Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm currently migrating a website to another server, and want to test the DNS configuration (more specifically, email mx records) before moving the domain over. I've configured the DNS on the new server to have mx entries for Google Apps in the same way that it's configured on the old server. The domain is controlled by nameservers on the old server at the moment, so the change would simply be updating the nameservers to the new servers. (What I'm getting at is DNS is controlled at the server level, not registrar level).

Since the website has quite a number of users, I want to make sure the configuration is right before flicking the switch. For this, can I add an entry to the hosts file of my local computer to point the domain to the new server? I've done this, and the web server works, but would this also test the email mx records on the new server?

share|improve this question

3 Answers 3

No, /etc/hosts is only used for address lookups. You need to modify the configuration of your resolver to point to the new name servers.

share|improve this answer

Change nameservers of domain, then go to

www.dnssy.com

and check is everything OK, and then revert them back if it is not, it will not propagate that fast and it will not impact to users experience :)

share|improve this answer

Do not use the hosts file for this; it replaces DNS lookups rather than doing them (and the ns1 subdomain has no special meaning).

On linux, you can use dig to test DNS; do dig @192.0.2.2 in mx yourdomain.tld where yourdomain.tld is replaced by your domain and the example IP is replaced by that of the nameserver under test.

On windows, use nslookup - 192.0.2.2 and enter the query mx yourdomain.tld.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.