1. News » 
  2. Technology » 
  3. Hosts File Windows 10: How To Edit Files In Windows 10?

Hosts File Windows 10: How To Edit Files In Windows 10?

Hosts File Windows 10: The Host file is a simple text file that outlines servers or hostnames to respective IP addresses and since the time ARPANET, these hosts files have been in use. This host file method was used in was initially used to resolve hostnames to a particular IP address. In this article, you will learn about hosts file windows 10 and how to edit.

by Rishavanthey Kamalak | Updated Oct 11, 2021 10:39 AM

Hosts File Windows 10: How To Edit Files In Windows 10?
Source: Twitter

Windows Hosts File

The Host file is typically saved in a plain text file in the Windows folder and modified for different use circumstances. Most of us would have used the host files edit to block some websites in the past. The primary use of this website is to find out if any unauthorized websites in schools and colleges. In many windows earlier versions of Windows, the host files editing was made pretty easy. You will add exceptions just for your antivirus software, then make the changes in your notepad and save it. The editing will be done. It is the same process in Windows 10, but when you save it, you will end up getting an error. 

Windows Hosts File Location

Based on the operating system, the location of the host file will vary. Each operating system will have a different storage location. In Windows 10, the host file will be stored in a C drive: "C: WindowsSystem32driversetchosts." In Linux, the host file is stored in "/etc/hosts", and in Mac OS X, host files will be saved in private drive, "/private/etc/hosts."

How To Edit Files In Windows 10?

Editing the host files was an easy task earlier but as days went by and versions upgraded, it became slightly harder. The procedures for editing the host files in Windows remains the same but as it concerns Windows 10, it is a bit hard since sometimes it may come up with an error notification. 

  • Go to the start menu and select “Notepad” in your Windows 10.

  • Without going into the Notepad, right-click on the notepad.

  • From the dropdown, list box select the option - Run Administrator. 

  • In the Notepad, select open and in the field name tab paste, c:WindowsSystem32Driversetchosts

  • Now, you can easily open the host file and make changes to it. 

Where is Hosts File Located?

The location of the hosts file differs by operating system. The typical locations are:

  • Windows 10 - "C:WindowsSystem32driversetchosts"

  • Linux - "/etc/hosts"

  • Mac OS X - "/private/etc/hosts"

hosts file windows 10

Windows hosts file location

hosts file location

Windows hosts file

Windows hosts file path

Disclaimer: The above information is for general informational purposes only. All information on the Site is provided in good faith, however we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability or completeness of any information on the Site.

Hosts File Windows 10 - FAQs

1. How do I find the host file path?      

Navigate to C:\Windows\System32\drivers\etc\hosts or click the address bar at the top and paste in the path and choose Enter. If you don't readily see the host file in the /etc directory then select All files from the File name: drop-down list, then click on the hosts file.

2. Where does Windows 10 store hosts file?

Windows 10 and Windows 8

  1. Press the Windows key.
  2. Type Notepad in the search field.
  3. In the search results, right-click Notepad and select Run as administrator.
  4. From Notepad, open the following file: c:\Windows\System32\Drivers\etc\hosts.
  5. Make the necessary changes to the file.
  6. Select File > Save to save your changes.
3. How do I add lines to the hosts file in Windows 10?

Windows 8 and 10

  1. Press the Windows key (previously Start menu);
  2. Use the Search option and search for Notepad;
  3. Right-click Notepad and select Run as administrator;
  4. From Notepad, open the host's file at: C:\Windows\System32\drivers\etc\hosts;
  5. Add the line and save your changes.
4. What is the host file in Windows?    

The hosts file is a Windows system file that can override DNS and redirect URLs or IP addresses to different locations. A typical home internet user will not have a modified hosts file.

5. How do I find my hostname in Windows 10?    

Open the Control Panel. Click System and Security > System. On the View basic information about your computer page, see the Full computer name under the section Computer name, domain, and workgroup settings.

6. How does the Hosts file work?    

A Hosts file is a file that almost all computers and operating systems can use to map a connection between an IP address and domain names. This file is an ASCII text file. It contains IP addresses separated by a space and then a domain name. The Hosts file will ignore it and move to try to find the site via DNS.

7. Is it safe to edit the host's file?    

All editing the Hosts file does is redirect an IP Address, so can have no detrimental effect on your system