Windows modifies the host file

Source: Internet
Author: User

In real-world development, we sometimes modify the Windows Hosts file to achieve the ability to map the specified domain name to the specified IP. Modify the method as follows:

1. The Hosts file location in Windows (WIN10):

C:\Windows\System32\drivers\etc\hosts

2. How to Modify

#将www. aaa.com domain name mapped to 127.0.0.1 IP address 127.0.0.1   www.aaa.com

  

3. Application

Without rebooting the system , after applying the modified Hosts file, open cmd and enter the following command:

3.1 Viewing DNS cache content

Ipconfig/displaydns

  

3.2 Remove the DNS cache content to achieve DNS update purposes

Ipconfig/flushdns

  

4. Access to custom domain name testing

  

Windows modifies the host file

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.