How do I set up the Hosts file? tutorial on binding IP addresses to domain names

Source: Internet
Author: User
Tags to domain

How do I bind the Hosts file? How do I bind an IP address to a domain name? As a small part certainly need hosts to bind the company's IP address, but many people do not know how to modify the settings of the hosts? Below to share the IP address with the domain name binding tutorial, the need for friends can refer to the following What is a Hosts file?

Hosts is a system file without extension, the main role is to define the IP address and host name Mapping, is to use some of the common domain name URL and its corresponding IP address to establish an association "database", when the user in the browser entered a need to log in the URL, The system will first automatically find the corresponding IP address from the Hosts file, if found, the system will immediately open the corresponding Web page, if not found, the system will then submit the DNS domain name resolution server for IP address resolution, if found to be blocked IP or domain name, will prohibit the opening of this page!


first, the location of the Hosts file:

Method One:

Under WINDOWS system, in the start-run inside input (Cannot find the Run menu can press the WIN+R key directly):C:\WINDOWS\system32\drivers\etc,:


Method Two:

Under Windows system, open My Computer, enter:C:\WINDOWS\system32\drivers\etc and press ENTER. :


Ii. How can the Hosts file be opened?

1, find the Hosts file , select it right-click, in the pop-up menu, select Open mode:



2. In the pop-up Program menu, select Notepad and open the hosts file with Notepad:

3, the Hosts file with Notepad open, you can make changes in the save.

Third, how does the hosts file bind the IP address to the domain name?

1, the Hosts file with Notepad opened, the original inside some text without it, in the following another line, enter the IP address, enter a space, enter the domain name, and then return to the line, save on it,:

2, after the IP address can enter multiple domain names, There are two ways, one is to add multiple domain names in the same line :

3, the other is to enter the domain name after the IP address, carriage return line, and then enter the domain name , personally think such typesetting convenient to view. :

Iv. the Hosts file binding does not take effect?

1. Is it correct to view the hosts file bindings? Is there a # number in front of the IP address? #号表示对修改的host中的IP地址, comments, will not take effect, the # removed, will be the domain name directly into the corresponding IP, and sometimes installed in the computer antivirus software, will prompt you to repair the Hosts file, repair after all the IP address will appear before the # number, If you determine that you have modified the hosts file, there is no security problem, the IP address before the # number can be removed.

2, after the domain name is the last line of text to remember to return to the line, leave blank line to line oh, otherwise it will bind invalid

3, theHosts file binding, still cannot take effect, if you have opened a browser may have a cache, you can switch off the browser and then reopen, or clean the browser's cache, you can also open a domain name with another browser.

4, Win 7, win 8, WIN10 system, there may be administrative rights issues, changes can not be saved.

How do I set up the Hosts file? tutorial on binding IP addresses to domain names

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.