Results 1 to 1 of 1

Thread: [How To] Preview A Site Before It Resolves Using the Windows Hosts File

  1. #1
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,932

    Default [How To] Preview A Site Before It Resolves Using the Windows Hosts File

    If you cannot access the site using the temporary IP address, you can modify your Windows hosts file instead.

    A) Opening the hosts file


    Windows XP
    To modify the file in XP, go to the Start menu then in the search box type "Notepad" then you see notepad come up in the search results, click on File > Open and open the file called C:Windows\System32\drivers\etc\hosts

    Windows Vista, Windows 7 and Windows 8
    To modify the file in Vista go to the Start menu then in the search box type "Notepad" then you see notepad come up in the search results, right click on it and select "Run As Administrator"

    No that notepad is opened up, go to the file menu and browse to
    C:\Windows\System32\drivers\etc\hosts

    B) Editing the hosts file


    Now that you are editing the hosts file, go to the last line of the file and add the following line:

    Code:
    111.111.111.111     somedomain.com
    111.111.111.111 is the IP address for your website, found in your welcome email.

    somedomain.com is your domain name that you wish to preview.

    Now when you visit somedomain.com in your browser (or any other application that uses DNS) you will be looking at the new server.

    When you are done testing you should comment out the line from the hosts file using the # symbol before any other characters in this line, so that this line is skipped when Windows reads the file.
    (example)
    Code:
    # 111.111.111.111     somedomain.com
    Or, if you are done testing, you can simply remove the 111.111.111.111 somedomain.com line from the hosts file and save.
    Last edited by Alexander; 07-26-2017 at 02:42 PM.
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | Follow us on X |

Similar Threads

  1. How to preview PHP in c panel..
    By QSoft in forum General Support
    Replies: 4
    Last Post: 02-11-2009, 09:48 PM
  2. Windows Vista
    By Angie in forum General Chit-Chat
    Replies: 4
    Last Post: 08-03-2008, 12:44 PM
  3. Site Preview: Image Links not working
    By rlhanson in forum General Support
    Replies: 2
    Last Post: 08-03-2007, 09:01 PM
  4. Preview and Working on Site before resolving...?
    By monkette in forum WHM, Resellers, VPS and Dedicated Hosting Topics
    Replies: 2
    Last Post: 03-21-2006, 09:16 PM
  5. How do I upload my site before my Domain resolves?
    By Matt in forum Knowledge Base
    Replies: 0
    Last Post: 01-18-2005, 03:57 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14