Β
One of the most useful tricks in Windows is the ability to edit the HOSTS file, a powerful system file that lets you control how domain names resolve on your computer.
π What Is the HOSTS File?
HOSTS file is a plain text file used to map domain names (like example.com
) to specific IP addresses. This file is checked before DNS servers, allowing you to override domain resolution locally.
β Common uses include:
- Blocking access to unwanted or malicious websites
- Preventing software from contacting licensing servers
- Redirecting websites for testing or development purposes
π HOSTS File Location
You can find the HOSTS file at:
C:\Windows\System32\drivers\etc\hosts
Note: The file has no extension and requires admin rights to edit.
βοΈ How to Edit the HOSTS File Using Notepad++
Follow these simple steps:
1. Open Notepad++ as Administrator | Download Notepad ++ Official | Full Version
Right-click the Notepad++ shortcut and select “Run as administrator.”
2. Navigate to the File
- Go to:
File > Open
- Browse to:
C:\Windows\System32\drivers\etc
- Set file type to “All Files (.)”
- Select and open the
hosts
file
3. Add Your Custom Entries
Hereβs an example of lines you can add to block specific domains:
127.0.0.1 license.bluesoleil.com
127.0.0.1 license2.bluesoleil.com
127.0.0.1 www.bluesoleil.com
127.0.0.1 cfs.u-ad.info
127.0.0.1 cfs1.uzone.id
127.0.0.1 cfs2.uadexchange.com
..... paste here
..... paste here
..... paste here
These redirect the domains to your local machine (127.0.0.1
), effectively blocking them.

4. Save the File
Press Ctrl + S
or go to File > Save
.
5. Flush DNS Cache (Optional)
To apply changes instantly:
- Open Command Prompt as Administrator
- Run:
ipconfig /flushdns
β οΈ Important Tips
- Always back up your original
hosts
file before making changes. - Use Notepad++ or another code editor with admin privileges.
- Be careful not to remove any default entries.
π§ Use Case Example β Block ISP Ad
If you’re in Indonesia and using IndiHome, you’ve probably noticed annoying ads injected by your ISP. By adding specific domains related to those ads in the HOSTS file, you can block them completely and browse without distractions.
β Final Thought
Editing the HOSTS file gives you local control over internet access and redirection. Whether you’re a developer, power user, or just want a cleaner browsing experience, this method is quick, safe, and effective.
Related
- How to Install Notepad++ on Windows β Quick & Easy Guide
- How to Simple Edit HOSTS File on Windows ?
- What are the risks of using outdated software?