Portal Home > Knowledgebase > DNS and NameServers > How to test your web site before DNS propagation


How to test your web site before DNS propagation




The easiest way to achieve this is by editing your hosts file. The hosts file is a simple list of “hard-wired” domain names and IP addresses that will bypass the normal DNS lookups. In linux systems the hosts file is usually found at /etc/hosts. In Windows systems it varies, but is commonly {windir}\system32\drivers\etc\hosts. This is a regular text file – open it in your favourite text editor and add a new line at the end:

216.180.241.26 yourdomain.example.com

ie. Your new account’s IP address and your domain name, separated by one or more spaces. Save and close the file, then restart your browser. Now browse to your web site and you’ll be seeing it on the new server. If the migration has gone well you may not notice any difference – if so you can check your server logs or use a phpinfo file to verify that you’re seeing the right server.

If you are using Windows Vista or Windows 7 to edit the host file,

Click Start – search for “Notepad“, right-click and select “Run as Administrator“. This should launch notepad with elevated privileges. Now, open the host file from the File menu, edit and save.


Note: This way the website is only opening for you, Others will not be able to see the website unless the DNS Propagation occurs completly.



Was this answer helpful?

Print this Article Print this Article

Also Read
What Is DNS Propagation? (Views: 1466)

Powered by WHMCompleteSolution