Unhide Hidden Hosts File

One of our readers (Fiat_bm) had a problem that his hosts file was hidden. Let’s try to unhide that file!
Unhide hidden hosts file

Easy Solution: Remove System Protection

The easiest solution would be to make sure that you can actually see protected system file. If that is not the case, you will not be able to see the hosts file. A virus might have changed the file attributes to make invisible to less advanced users who did not enable this option. However, there are also far more advanced viruses that remove the header of a file or use some other nasty techniques to hide the hosts file.

0. Before following the steps below, simply set the settings to show protected system files. Learn more

Some smart viruses may not allow you to change that setting, then you have to change the file attributes manually via command line:

1. Step Open an elevated command prompt
2. Step Enter cd C:\Windows\system32\drivers\etc
3. Step Enter attrib -r -a -h -s hosts

Change File Attribute of Hosts File

-r (remove read-only)
-a (remove archive attrib)
-h (remove hidden attrib)
-s (remove system attrib)

Hidden is the first layer of protection. “System” normally protects system files and you may not see them.

Scan With Malwarebytes

If you have a more advanced virus on your machine you should scan the hosts file directory with Malwarebytes. I recommend to run a quick full scan via command prompt.

Please read this tutorial: How to run Malwarebytes from command prompt

Additionally, it would be in your interest to download HijackThis and run a scan. Possibly post your HijackThis log on some tech support forums, you may need some professional help.

Secure Windows 7 With This Hosts File

After running a scan, you may want to secure Windows 7 with this hosts file that prevents access to some common spam sites that spread viruses and malware:

Secure Hosts File

5 of 5 0 (100%) 1 vote
- Cheers!

Written by:
Oliver is the founder and lead editor of this site. He is interested in finding new ways to break Windows, find common errors and help others to fix them. Aside from that, he loves to fully customize systems with Rainmeter and Dreamscene, find out more about ancient civilizations like the Chachapoya, sharpen his digital photography skills and create software with a small group of selected developers. If you would like to connect with him to discuss anything, send him a mail!

Learn More About.Me

Follow me on Twitter for daily updates:

Contact The Author:

Get Free Help

Connect With Our Site:



Need help? Ask a question at our QA site, click the red button to get started:
Want to support us? Great, simply buy your favorite games from G2A via our referral link (g2a.com/r/win7themes) and save money at the same time:

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *