Our Blog

NaN Host Blog

How to access your web site before DNS propagation is complete

Know something special

After you update your domain's name server settings, DNS propagation can sometimes take from 24 to 48 hours to complete. During this time, you cannot use your domain name. However, you can bypass DNS and view your web site by using a shared URL or the hosts file.

Table of Contents

Method #1: Use a shared URL
Method #2: Use the hosts file
More Information
Related Articles

METHOD #1: USE A SHARED URL


This is the recommended method, because you do not have to modify any configuration files on your local computer.

NaNHost  provides shared URLs that enable you to access your web site without using its domain name. The URL you use depends on the type of account you have, and which NaNHost  server hosts your account. To view the correct shared URL for your account, log in to the NaNHost Customer Portal at https://natoreit.com. Select My Services from the Services menu. Under My Products & Services, locate your hosting package, and then click Manage. Alternatively, for information about how to determine the shared URL for your account, please see this article.

Some Content Management Systems (CMS) and web applications may not display correctly when you use a shared URL. This is because they are configured to use your domain name, which is different from the shared URL. For example, you must update two database settings every time you use a different domain name with WordPress.

METHOD #2: USE THE HOSTS FILE


Another method for bypassing DNS is to use the hosts file on your local computer. The hosts file contains domain name to IP address mappings. These mappings mimic the function of a DNS server, and allow you to “trick” your computer into associating a domain name with a particular IP address.

To use the hosts file to bypass DNS for your domain:

#1. Open the hosts file in a text editor. The location of the hosts file depends on your computer's operating system:

  • On Microsoft Windows computers, the hosts file is located at \%SystemRoot%\system32\drivers\etc\hosts.

On Windows Vista, Windows 7, and Windows 8, click Start, search for Notepad, right-click the icon, and select Run as Administrator.On Windows 10, click Start, type notepad, right-click Notepad, and then click Run as administrator.This starts Notepad with the elevated privileges necessary to open, modify, and save the hosts file. Note that in Notepad's Open dialog, you must use the All Files filter to see the hosts file.

  • On Apple Macintosh computers, the hosts file is located at /private/etc/hosts.
  • On Linux computers, the hosts file is located at /etc/hosts.

The hosts file is a plain text file, so you should use a plain text editor like Notepad or nano to edit it. Do not use a word processor like Microsoft Word!

#2. When you open the hosts file, you should see an entry that resembles the following line:

127.0.0.1                       localhost

#3. To create a new mapping for your domain, add the following line to the file:

192.0.43.10 example.com www.example.com

Replace the IP address with your NaNHost  server's IP address, and replace example.com with your web site's domain name. You can obtain your account's IP address by logging in to https://nanhost.com/

#4. Save the hosts file and exit the text editor.

If you are using Mac OS X, you should also clear the DNS cache. For information about how to do this, please see this article.

#5. To test the configuration, restart your web browser and go to http://example.com or http://www.example.com, where example.com represents your domain name. You should see your web site's main page (assuming you have created some content).

After DNS propagation is complete, make sure you go back and remove the relevant entries from the hosts file!

MORE INFORMATION
For more information about the hosts file, please visit http://en.wikipedia.org/wiki/Hosts_(file).

0 Users Found This Useful (0 Votes)

Was this answer helpful?

Related Articles

Social Media Marketing

Social Media Marketing Process

How to access your web site before DNS propagation is complete

Know something special