Want to test the website from new server before DNS change ? or want to see the website from old server after DNS change ?

Don’t worry. Yes, we can do. Here is the option for that.

We can use advantage of “hosts” file in your local machine to test the working of your site. It is the local system file that use to map the hostname to IP before the system start looking for the DNS servers. Please follow the below steps to do this.

Assume your domain name is “example.com” and the new IP is “2xx.xxx.xxx.xxx”

If your local machine is running “LINUX” OS with GUI. Please follow the below steps.

1) Open the “Terminal” program.

2) Edit the hosts file.

4) Save the file.

5) Now open the browser and clear the browser cache. Call the domain “example.com“. It will load from the new IP and you can test it now! 🙂

If your local machine is running “Windows” OS. Please follow the below steps.

1) Locate the “hosts” file is the first part. You can find it below.

2) Start the notepad in “Administrative Mode” and open the “hosts” file. Please follow the below steps.

  • Find the “notepad” under programs
  • Right click on it and choose “Run as Administrator” then locate and open the hosts file.

3) Enter the below lines at the end of the “hosts” file.

4) Save the file.

5) Now open the browser and clear the browser cache.  Call the domain “example.com”. It will load from the new IP and you can test it now! 🙂

If your local machine is running “MAC” OS. Please follow the below steps.

1) Open the “Terminal” program. You can find it under Applications >> Utilities

2) Edit the hosts file.

3) Add the below lines.

4) Save the file.

5) Now open the browser and clear the browser cache.  Call the domain “example.com”. It will load from the new IP and you can test it now! 🙂

That’s it!! 🙂

Let us know if you face any issues or doubts. We will be right here for your help.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


*