Knowledge Base

How to access your web site before DNS propagation is complete

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.

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.

Webhost.Berlin 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 Webhost.Berlin server hosts your account. The Welcome e-mail you received when you became an Webhost.Berlin customer provides the correct shared URL for your account.

For more information about shared URLs, and how to determine the shared URL for your own 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 RedHat Linux 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 a line to the file as follows:

    192.0.43.10 example.com

    Replace the IP address with your Webhost.Berlin 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 http://my.berlin.hosting.

  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, where example.com is your domain name. You should see your web site's main page (assuming you have created some content).

    When 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).