View website without changing the DNS

March 8, 2015 449 views
Getting Started DigitalOcean

I have created the following domain.
Domain :

After transferring the files to new server, how can I check whether the website is fine before changing the DNS.

Please advise.

1 Answer

This can be done by adding a hosts file entry on your local computer. A hosts file entry tells your computer to use a specific IP address for a name rather than what is returned by a DNS query and is useful for just this purpose.

On Windows the hosts file can be found in C:\Windows\system32\drivers\etc\ and on Linux and Mac systems it can be found in /etc/hosts

The format is an IP address and name, separated by a space or tab. Once you are done testing you should remove the entry to ensure you are properly querying DNS again (otherwise if a DNS issue occurs in the future you may not be able to see it).

Have another answer? Share your knowledge.