There was a problem loading the comments.

Edit my hosts file to preview a domain name

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
You will need the domain name (eg: example.com, test.example.com) and the IP address of the target server. Make sure you close all open browser windows before doing this.
 
Host File Location: c:\windows\system32\drivers\etc\hosts
 
1) Copy the location to your 'hosts' file from the respective Operating System above (copy only the bold area) 2) Open Windows Notepad (Start -> All Programs -> Accessories -> Notepad) 3) Click on the File menu and choose Open... 4) Paste that location into the File name: field and click the Open button 5) Start on a new line at the bottom of the file 6) Type the IP address, hit the TAB key, then type the domain* 7) Save the file and close all open browsers before attempting to browse to the domain.
Remember, this is only a temporary fix, so once your registrar has the updated information and DNS is fully propagated, you will need to remove any lines you added to the 'hosts' file.
NOTE: this ONLY works on the computer where you changed the 'hosts' file.
*You can add more than one hostname on the same line, just make sure you have at least one space or TAB in between each one. Example line: 192.168.0.10 example.com test.example.com www.example.com

Share via
Did you find this article useful?  

Related Articles

© Softsys Hosting