Modify the host file - Scientific Internet

The Hosts file is a file in the Windows system that is responsible for the express resolution of IP addresses and domain names, and is saved in ASCLL format. When a computer is typing a domain name, it will first look at the hosts file to see if there is any record of the IP address of the domain name. If so, log in directly to the website; if not, query the DNS server.

So, why modify the HOSTS file to achieve overturning the wall?

No matter what website address you hit on the Internet, in fact, it must be converted into an IP address before you can access it. Usually, this conversion is done by a DNS server on the network. But sometimes, for some websites, for some reason, the DNS server on the network can't give the correct or available IP address (there are many celestial dynasties, everyone understands).

At this time, the hosts file can do it for you. You can directly open the file with Notepad and see it. One line is a record, and an IP address is followed by a space or tab, followed by a URL. Its function is to translate these URLs into IP addresses directly on your computer.

Starting from Windows 2000, the order in which Windows resolves names is:
DNS cache –> hosts file –> DNS Server –> NetBIOS cache –> WINS Server –> broadcast –> LMHOSTS file
The priority of the hosts file is higher than that of the DNS Server, so modify the hosts Files can skip tainted dns servers.

What is the format of the Hosts file?

Open the hosts file with Notepad. Its function is to include the mapping relationship between IP address and Host name (host name). It is a regulation for mapping IP address and Hostname (host name). The regulations require that each segment can only include one mapping relationship. The IP address should be placed at the top of each segment, and the mapped Host name should be written after the space. The mapping description for this paragraph is separated by "#" and then described with text.

Why do you need to update the Hosts file in time?

The mapping configured in the Hosts file is static. If the computer on the network changes, please update the IP address in time, otherwise it will not be accessible.

The Git project keeps updating the available Hosts file:

https://github.com/racaljk/hosts

How to modify the Hosts file to achieve overturning the wall?

(1). Copy the contents of the hosts file from the above Git project to a txt file, name it HOSTS, and remove the extension! ! !

The Win7 system HOSTS file is located in C:\Windows\System32\drivers\etc\hosts without extension.

(2). Make it effective

Windows

Start -> Run -> enter cmd -> enter in the CMD window

ipconfig /flushdns

(3) Use Google Chrome to log in to Google, Gmail, Wikipedia, Twitter, Facebook, etc. at will, but must use https encryption to open

Google Hong Kong: https://www.google.com.hk

Google: https://www.google.com/ncr

PS: What does "/ncr" in www.google.com/ncr mean? What does it do?

ncr : no country redirect

If google thinks you are from a foreign country or region,it likes to redirect you to your regional google page.For most people,this makes sense.However,if you prefer the generic,english,plain version,this would be very annoying.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325126363&siteId=291194637