In this tutorial, we will take you through how to access a testing website before domain name resolution is completed. Frankly speaking, this is quite necessary especially when you want to put a website to the test without affecting the current traffic and performance. To start with, here is a brief introduction of the mentioned Domain Name Resolution.
What Is Domain Name Resolution?
When accessing a website most of the Internet users would use a domain name within the web browser, such as www.besthostingforasp.net. However, the fact is that Internet applications like WebMatrix publishing tool do not communicate through domain names, and instead they only support IP addresses. The way these domain names are converted to the mapped IP addresses is so-called “Domain Name Resolution.”
Note that, the vast majority of resolutions from hostnames to IPs can be achieved by a procedure – DNS (namely Domain Name Server). Once you’ve input a domain name in an Internet application, then the application itself will let the operating system convert the hostname to the supportive IP address. Of course, this transition process can rarely be noticed by us.
How to Access Your Website Before Domain Name Resolution Is Performed?
Accessing a website whose domain name hasn’t been resolved by DNS is fairly simple, which requires you to manually add additional entries within the hosts file. Below are the detailed steps to achieve this objective.
Step 1 – Search & Find Notepad File
First and foremost, you are supposed to search and open your notepad file that is located at the “Start” menu of Windows 8 operating system. If you happen to use Windows 7, you can also find the notepad file under accessories inside the “Start” pop-up. Do remember to right-click it and run as administrator as below.
Step 2 – Allow Notepad to Make Computer Changes
If done, a new dialogue window will appear onscreen saying “Do you want to allow the following program to make changes to this computer”. To proceed, just click on the “Yes” option. Sometimes it may ask the administrator password to perform this command, and you need to enter it before going on.
Step 3 – Access Your etc File
The next step is to open your notepad window as follows. Here, all you need to do is expand the “File” option and make a hit on this “Open” ellipsis button within this drop-down menu. This will open a browse window, from which you can get the access to the “etc” folder via C:/Windows/System32/drivers/etc. As you can see, all involved files and folders are mainly located at the C local disk.
Step 4 – Change File Type
If you are unable to find any files within the mentioned “etc” folder, the chances are that you’re using the default file type. To make the “hosts” file visible from this browse window, you should change the file type from “Text Documents (*.txt)” to “All Files (*.*)”. Now that your “hosts” file has appeared on the screen, it’s time to make changes to it.
Step 5 – Open Your Hosts File
Just double-click this “hosts” file as above. In the next screencast, you will have an overall look at the mappings of IP addresses to hostnames. Without doubt, this notepad file is editable.
Step 6 – Add Your New Entry
As is documented, the names on the right-hand of the entries are IP addresses, which are always kept on individual lines. To add new entry to your “hosts” file, just drop down to the bottom of this window and then type in your IP address that is followed by the corresponding hostname. Pay attention that, there will be at least one space between an IP address and hostname. Here is an example of how it works.
After done with all settings, do not forget to save changes by pressing “Ctrl” + “S” buttons from the keyboard. Alternatively, you can choose to “Save” by expanding the “Open” menu again. If you are unsure about the IP address, then you can visit http://whatismyip.com or http://ipchicken.com. To check whether or not your website is accessible, just type its domain name in any web browser.