# Editing a .SAM file?



## Toyman (Mar 24, 2001)

How do you edit a .SAM file? I need to edit my hosts file in windows ME to block web ads from popping up but can't get in to enter what i need to. Any help is greatly appreciated.

Toyman


----------



## Bryan (Jul 3, 1999)

Just open it with Notepad but once your done editing it, save it as just Hosts with no file extension or it won't be an active Hosts file. The .sam file is just a sample of the contents of an active Hosts file, hence .sam for Sample file.

BTW, a hosts file won't actually physically stop a popup window from appearing. It will still open and appear on your desktop but if you edit your Hosts file correctly, it should just say Cannot Find Server.


----------



## Toyman (Mar 24, 2001)

Thanks Bryan, your help is always apprciated.


----------



## Bryan (Jul 3, 1999)

Your welcome.  This  may help you if you run into problems editing it.

A Hosts file can serve multiple purposes such as eliminating DNS lookups for certain sites, redirecting, etc... but in your case, if you want to stop pop windows from connecting to sites, you'd enter the site URL and an IP of 127.0.0.1 which is your PC.

For example,

127.0.0.1 ads.doubleclick.net

But to be perfectly honest with you, a Hosts file isn't the best way to stop popup ad windows. You'd need to enter every possible site URL and they keep changing, so it would be a practice in futility. I basically put up with them. Your other alternative is to install some sort of popup stopper freeware but I don't recommend them since I've seen them cause problems down the line. Anyway, good luck, I hope this helped ......


----------

