How to Simple Edit HOSTS File on Windows ?

  • Posted by:
  • Posted on:
  • Category:
    Software, TutorialsSoftware, Tutorials
  • System:
    Unknown
  • Price:
    USD 0
  • Views:
    23

Β 

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

 

Rating

0

( 0 Votes )
Please Rate!
How to Simple Edit HOSTS File on Windows ?

No votes so far! Be the first to rate this post.

Leave a Reply

Your email address will not be published. Required fields are marked *