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.
IntroNexus Hosting 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 IntroNexus Hosting server hosts your account. To view the correct shared URL for your account, log in to the IntroNexus Hosting Customer Portal. Select My Services from the Services menu. Under Services, locate your hosting package, and then click Manage.
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:
- 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!
- When you open the hosts file, you should see an entry that resembles the following line:
- To create a new mapping for your domain, add the following line to the file:
188.8.131.52 example.com www.example.com Replace the IP address with your IntroNexus Hosting 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 IntroNexus Dashboard.
- 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.
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!
SSL CERTIFICATES BEFORE PROPAGATION
Modern browsers increasingly expect SSL connections and generate error messages when SSL is not used. To get the best preview of your site before DNS updates, use one of the following methods. These methods only work with the hosts file method described above.
Copy an existing SSL certificate
If your site currently has an SSL certificate, you can move it to your new location. To move the SSL certificate, make a copy of the certificate and the private key. It is not necessary to move files, you can simply copy the certificate and key to your computer’s clipboard and then paste it in place. These instructions show you how to correctly enter the certificate and key into your hosting contol panel.
Use a self-signed certificate
If you do not already have an SSL certificate, you can create one and use it temporarily to view your site with SSL. You should replace the self-signed certificate with a certificate from a recognized certificate authority when your site is ready to go live. Follow these instructions to install a self-signed certificate.