BIOS,Windows, Linux, Software,Security, Domains, Web Hosting

Map Hostname to IP Address Using Hosts

Mapping a hostname to IP address using hosts file is very convenient, we do not need to alter DNS preference anymore, In fact, we have no permissions to visit the local DNS servers unless you are the administrator.

So this post will be useful for your preference to map (change) a hostname to an individual IP address.

1. Find and open hosts file in your system

For Windows XP/7/8, it may be in C:\Windows\System32\drivers\etc\hosts, if you have not modify the default installation directory. If we are using Vista/Windows 7/8, we cannot edit the hosts file and save it directly.

How to Modify Hosts File in Windows 7

Screenshot of hosts:

2. Map hostname to IP address

Map a hostname to Loop back address,

Then will always point to the local computer.

Map a hostname to null address,

Then will be blocked because it point to a null IP.

3. Save changes and Replace hosts

If your testing browser is opened before your changes, it may be need to closed first and reopen again to take effect.



Leave a Reply

Subscribe to BootBeta Comments RSS feed to receive notification of latest comments posted.


  • Enter Email Address:

Recent Post

Copyright@ 2010-2014 Bootbeta All Rights Reserved.
HooBlog Ver 1.5 Build 20140530