The host file is mainly used to block certain programs or programs from reaching a particular hostname or to redirect the hostname request to a different IP address. It’s also often used to block (or redirect) certain websites that you don’t want someone with access to the same computer (or one of your programs) to be able to contact the hostname if they need to.
If you were asked to edit the Hosts file to block a specific hostname or redirect to an IP address, this guide will show you where the Hosts file is located, how to properly edit the Hosts file in Windows 10, and why you couldn’t save the Hosts file after editing it.
To edit a host file in Windows 10
Pay attention: Modify the hosts file carefully and at your own risk. Adding and reloading an important hostname may cause certain programs to stop running or certain features to become unavailable if the hostname they need to connect to becomes unavailable or invalid as a result of reloading a hostname in the Hosts file.
To edit or add an item to the Hosts file in Windows 10, follow these steps.
- Search for Notepad in the Windows 10 search bar. Right-click Notepad in the search results and select Run as Administrator.
- In Notepad, click File and select Open.
- In the Open window, click the drop-down menu that displays the text (.txt) documents at the bottom and then select All Files. So you can see all the files, not just the txt files.
- Then switch to C:WindowsSystem32driversetc (switch to C: if your Windows operating system is on another drive). Select the file named hosts and click the Open button.
- To convert a host name to a specific IP address, type the IP address (for example, 127.0.0.1), then a space (or TAB), and then the host name (for example, abc.example.com) on a new line.
- When you’re done editing, press CTRL + S (or File > Save) to save your changes.
What are the rules for editing the Hosts file?
You can add as many cards as you want. Make sure only one card is drawn per row. Also, make sure there is no # sign at the beginning of the line where you enter your cartography, because # (comment) means you are ignoring the line.
Also, the host file does not have and should not have an extension. Therefore, it cannot be opened normally with a double click. You need to open it with Notepad or another text editor. We recommend Notepad because it is the easiest to use.
The Hosts file cannot be saved because access is denied?
This is a common error that users get when they try to edit the Hosts file without administrator privileges and cannot save the Hosts file after editing. You must have permission to modify the Hosts file in Windows 10.
You can do this by first starting Notepad as administrator, then browsing for the Hosts file and opening it from Notepad. If Notepad has administrator privileges, you should be able to save the Hosts file normally by pressing CTRL+S.
Which IP address should I use in the hosts file?
If you have no idea what you are trying to do, please do not add mappings to the host file, as this may hinder some programs that need to access the host name. This will also block access to the displayed hostname or website address.
However, if you already have a set of mappings that you want to add ahead of time, just follow the steps above to add them to the hosts file.
If you just want to block a website or hostname from being accessed by software or programs, you can use the address 127.0.0.1 followed by the hostname or website you want to block. The hostname or website address is thus resolved to the IP address 127.0.0.1, which is normally inaccessible.
Description to share : The file hosted in Windows 10 does not work, cannot be saved or access is denied. Here’s how to properly edit the Hosts file in Windows 10.
don’t have permission to save hosts file windows 10, edit hosts file windows 10, ampps access denied: you dont have permissions to edit hosts file. entry wont be added to host file., cannot edit hosts file used by another process, can’t edit hosts file windows 7, windows hosts file no permission, host file access denied windows 7, how to disable hosts file windows 10