How do I modify my hosts file?

Free Seo Tool

How do I modify my hosts file?

Modifying your hosts file will allow you to override the DNS for a domain, on that particular machine. This can be used to test your site without the test link, prior to going live with SSL, verify an alias site works prior to DNS changes, or for other DNS related reasons. This causes your local machine only to look directly at the IP specified. Your hosts file will need to have two entries added that will contain the IP address you want the site to resolve to and the address. Adding the below two lines for example will point www.domain.com and domain.com to our current PHP5-ITK ("Refreshed" PHP5) cluster:

  1. Windows Vista and Windows 7
  2. Vista and Windows 7 use User Account Control (UAC) so Notepad must be run as Administrator.

    • 1. Click Start -> All Programs -> Accessories
    • 2. Right click Notepad and select Run as administrator
    • 3. Click Continue on the "Windows needs your permission" UAC window.
    • 4. When Notepad opens Click File -> Open
    • 5. In the filename field type C:\Windows\System32\Driverstc\hosts
    • 6. Click Open

  3. Windows NT/2000/XP
    • 1. Click Start -> All Programs -> Accessories -> Notepad
    • 2. Click File -> Open
    • 3. In the filename field type C:\Windows\System32\Driverstc\hosts
    • 4. Click Open

  4. Linux
    • 1. Open a terminal window
    • 2. Type sudo nano /etc/hosts (you can substitute any text editor)
    • 3. Enter your password

  5. Mac OS X 10.0 - 10.1.5
    • 1. Open /Applications/Utilities/NetInfo Manager.
    • 2. To allow editing the NetInfo database, click the padlock in the lower left corner of the window.
    • 3. Enter your Admin password and click OK
    • 4. In the second column of the browser view, select the node named "machines." You will see entries for -DHCP-, broadcasthost, and localhost in the third column.
    • 5. The quickest way to create a new entry is to duplicate an existing one. So select the "localhost" item in the third column.
    • 6. Choose Duplicate from the Edit menu. A confirmation alert appears.
    • 7. Click Duplicate. A new entry called "localhost copy" appears, and its properties are shown below the browser view.
    • 8. Double-click the value of the ip_address property and enter the IP address of the other computer.
    • 9. Double-click the value of the name property and enter the hostname you want for the other computer.
    • 10. Click the serves property and choose Delete from the Edit menu.
    • 11. Choose Save from the File menu. A confirmation alert appears.
    • 12. Click Update this copy.
    • 13. Repeat steps 6 through 12 for each additional host entry you wish to add.
    • 14. Choose Quit from the NetInfo Manager menu. You do not need to restart the computer.

  6. Mac OS X 10.6 - 10.1.8
    • 1. Open Applications > Utilities > Terminal.
    • 2. Open the hosts file by typing the following in the Terminal window:
    • sudo nano /private/etc/hosts

      Type your user password when prompted

    • 3. Edit the Host File,The hosts file contains some comments (lines starting with the # symbol), as well as some default hostname mappings (e.g. 127.0.0.1 – local host). Append your new mappings underneath the default ones.
    • 4. Save the Host File, When done editing the hosts file, press Control+x to save the file.
    • 5. Make your changes take effect by flushing the DNS cache with the following command: $ dscacheutil -flushcache
    • 6. New mappings should now take effect.

Advertisement
APK downloader

Website Status Checker Bookmarklet

Once added to your toolbar, this button will let you to check the status of a site from your browsers toolbar.

Just drag the button your bookmarks bar:

Down Right Now?

WEBSITE UP RIGHT NOW

LAST CHECHED

Report Service Issues on Twitter

Help spread the word about service disruptions! Just include the hashtags #downuptime in your tweet and we'll factor it into our stats.

COMMON USER ERRORS

  • Connection Error

    show

  • Bad Settings

    show

  • Software Problem

    show

  • Operating System

    show

  • Hardware

    show

COMMON SERVER ERRORS

  • Domain Name

    show

  • Server Error

    show

  • Misconfiguration

    show

  • Hosting Failure

    show

  • Other

    show

WHAT TO DO

  • Wait a few minutes

    show

  • Official announcements

    show

  • User reports

    show

  • Contact Webmaster

    show

  • Find Alternatives

    show