FixItMarc » Web Hosting » How To Preview A Website On A New Host/Server During DNS Propagation

How To Preview A Website On A New Host/Server During DNS Propagation

DNS propagation can last from a couple of hours to a couple of days. Rarely it lasts over 48 hours, however, it is likely depending on your ISP and if DNS is cached.

How To View A Website During DNS Propagation

If you are still visiting the website from the old server and your web host does not offer a preview option via link from your server’s control panel, you can still access it on the new server during DNS propagation. All you’re required to do is navigate and make a simple edit until your DNS has propagated.

What you need :

  • The IP address of the new server the website is hosted on.
  • Administrator privileges on your Windows OS computer.

What to do :

Step 1 : Open Notepad as an Administrator (Right-click the program and select “Run as Administrator”).

Step 2 : Select “File” from the navigation menu and choose “Open”.

Step 3 : Navigate to one of the following paths depending on your operating system (I use Windows) :

  • Windows: C:\Windows\System32\drivers\etc
  • Apple: /private/etc/
  • Linux: /etc/

On Windows, change the bottom-right dropdown option from “Text Document (*.txt)” to “All Files” to view the contents.

Opening Host file on Windows Computers

Note: It is recommended to make a backup of your HOSTS file since you will be editing its contents.

Open the file named “hosts” and you should find something like this :

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost

Add another line under it so it looks like the following :

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	204.79.197.200       bing.com

Remove “#” from the line, replace “204.79.197.200” with the IP of the website on the new server and “bing.com” with the domain name of the website. After, save the changes. If you are unable to save normally, create a new “hosts” file with the newly added contents and overwrite the file.

Take note that the contents should look exactly like the contents above (with the number of spaces between the number sign, IP address and domain name). After editing your hosts file, open a new web browser and type in the domain. You should be able to access the website on the new server now.

FixItMarc.com contains guides to help webmasters with their websites, from resolving problems to learning how to make a site successful.

Copyright © 2024 FixItMarc.com.