This brief tutorial shows students and new users how to edit or modify Windows 10 local hosts file.
When you think of a hosts file, think of it as plain-text file used by the operating systems to map IP addresses to hostname on the local computer. The hosts file has priority over DNS.
When you type a domain name in your browser to go to a website, your computer translates the domain name your typed into an IP address and connect to the server that hosts the website.
While translating the name to IP, the local hosts file is the first file your operating look at. If the IP to domain mapping isn’t included in the host file, then it looks up a DNS server online. This is how the process works.
When you’re dealing with hosts file, the IP address and the domain or hostname should be separated by at least one space or tab. The lines starting with # are comments and are ignored.
When you’re ready to edit Windows 10 local host file, follow the steps below:
Step 1: Open Windows 10 Hosts File
The process of editing Windows 10 hosts file is simple and straightforward. To add an entry or modify the hosts file, simply open the hosts file at the path below using Notepad or any other text editor.
A similar lines below should appear in the file.
# Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 126.96.36.199 rhino.acme.com # source server # 188.8.131.52 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost
Changes you make to the hosts file take effect immediately. If you want to undo changes to the hosts file, simply open the file and remove the lines you added or precede the line with a # to ignore it.
Step 2: Add Host Records
On Windows systems, the hosts file must be opened as an administrator.. If the hosts file is not opened as an administrator, it won’t allow changes to be saved..
To open as administrator, follow the steps below:
- Press the Windows key and type Notepad in the search field.
- Right-click on the Notepad icon and select Run as administrator.
- In Notepad, click File then Open. In the File name field, paste c:\Windows\System32\drivers\etc\hosts
For example, to add an entry to translate 127.0.0.1 to example.com, open the hosts file and add its entry by scrolling down to the end of the file and add your new entries:
# Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # For example: # # 184.108.40.206 rhino.acme.com # source server # 220.127.116.11 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost 127.0.0.1 example.com ...............................
Save the file and exit.
As we said above, the changes takes effect immediately. You will be able to example.com in your browser as soon as you save the file.
This is how one add or modify Windows 10 hosts file entry..
For student or new user looking for computer system to start learning on, the easiest place to start is Windows 10…. It’s a the most popular operating system for beginners.
Windows 10 is an operating systems created by Microsoft that runs on desktops, laptops, server and other devices.
When using Windows 10, you will find that it’s not so different from other operating systems in so many ways, especially when it comes to using the system to get work done.…
Windows 10, Mac OS and other systems allow you to be productive, easy to use, reliable and enable you to install and run thousands of programs from gaming to productivity suite software for individuals and businesses..
You may also like the post below: