How to Edit Hosts File in Windows 11/10/7 | Add Lines in Hosts File

Опубликовано: 16 Февраль 2023
на канале: Tech Mash
69,112
603

In this video, I'll be discussing how to edit the Hosts file on Windows operating systems. The Hosts file is a simple text file that can be used to map IP addresses to domain names. By default, it is located in the Windows\System32\drivers\etc directory.

To edit the Hosts file, I'll need to use a text editor that has administrative privileges. I'll be using Notepad, which is a default text editor that comes with Windows.

Here are the steps to edit the Hosts file in Windows:

Open Notepad as an administrator. To do this, right-click on the Notepad icon and select "Run as administrator."

From the Notepad menu, select "File" and then "Open." Navigate to the Windows\System32\drivers\etc directory, and select the "hosts" file.

Once the file is open, you can add entries to it. To add an entry, simply type the IP address followed by the domain name. For example, if you want to map the IP address "192.168.0.1" to the domain name "example.com", you would add the following line to the Hosts file:

192.168.0.1 example.com

Save the changes to the file.

Finally, flush the DNS cache to ensure that the changes take effect. To do this, open a Command Prompt window as an administrator and run the command "ipconfig /flushdns".

That's it! You've successfully edited the Hosts file on your Windows machine. This can be useful for various purposes, such as blocking access to certain websites, or redirecting a website to a different IP address. Remember to be careful when editing the Hosts file, as it can potentially cause issues with your system if done incorrectly.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
► ► Related videos for you to watch ► ►

► Check If Your PC Can Run Windows 11 and Enable TPM 2.0 on the BIOS:    • Check If Your PC Can Run Windows 11 a...  

► Install Windows 11 Easily on Any Computer | With or Without TPM | Unsupported PC or Hardware:    • Install Windows 11 Easily on Any Comp...  

► How To Turn On Personal Hotspot In Any iPhone:    • How To Turn On Personal Hotspot In An...  

► How to Transfer contacts from Google account to iPhone:    • How to Transfer contacts from Google ...  

► Turn Off Notification In Windows 10:    • How to Enable or Disable Notification...  
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🔔 Subscribe to Tech Mash:    / techmash  
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🗣 For BUSINESS INQUIRIES ONLY:- [email protected]
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🗣 𝐅𝐎𝐋𝐋𝐎𝐖 𝐎𝐍 𝐒𝐎𝐂𝐈𝐀𝐋 𝐌𝐄𝐃𝐈𝐀
► Facebook:   / techmash01  
► Twitter:   / techmash01  

If it helped you then hit the like button and let me know in the comment below.