The best way of testing your sites is to modify your local hosts file right on your local computer. This file allows you to tell your local computer what IP to use when loading a particular domain.
So to view your website before updating your nameservers, do the following:
The hosts file (/etc/hosts) serves the function of translating Hostnames into IPs locally without referring to DNS servers. This file contains lines of text consisting of an IP address in the first text field followed by hostname. Each field is separated by a white space. If there is an entry for a domain in the Hosts file (/etc/hosts), it means that the system will not do a DNS lookup for that domain and it will be automatically redirected to the IP address you specified in your hosts file. So in other words, you tell your computer to view “thiswebsite.com” on “this server instead of where it’s really pointing to”
The default entry in the hosts file is:
Please make the following entries in the Hosts file (/etc/hosts) on your local machine.
For Windows 10 and 8 follow the below steps:
- Press the Windows key.
- Type Notepad in the search field.
- In the search results, right-click Notepad and select Run as administrator.
- From Notepad, open the following file: c:\windows\System32\Drivers\etc\hosts
- Make the entries mentioned above.
6. Click File > Save to save your changes.
For Windows 7
- Click Start > All Programs > Accessories.
- Right-click Notepad and select Run as administrator.
- Click Continue on the Windows needs your permission UAC window.
- When Notepad opens, click File > Open.
- In the File name field, type c:\windows\System32\Drivers\etc\hosts
- Click Open.
- Make the necessary changes to the file.
8. Click File > Save to save your changes.
- Open a terminal window.
- Open the hosts file(/etc/hosts) in a text editor (you can use any text editor).
3. Make the necessary changes to the file
- Edit “/private/etc/hosts”
- Make the entries.
3. Save changes
After doing this, please load the site in your browser and check whether it is loading fine or not.