Subscribe to Windows IT Pro
August 18, 2003 12:00 AM

Block Pop-Up Ads

Windows IT Pro
InstantDoc ID #39681
Rating: (0)

[Editor's Note: Share your security discoveries, comments, problems, solutions, and experiences with products. Email your contributions (500 words or less) to r2rsecadmin@winnetmag.com. We edit submissions for style, grammar, and length. If we print your submission, you'll get $100.]

If you've been on the Internet lately, you've probably encountered dozens of pop-up ads. Every major Web site has pop-up ads, and most users find the ads annoying. You can disable scripting to get rid of the ads, but doing so might cause problems with other services. Alternatively, you can edit your hosts file to disable the pop-up ads. Editing your hosts file will keep pop-up ads from loading properly and clogging up your system.

Your hosts file's location depends on which version of Windows you're running. In Windows XP, Windows 2000, and Windows NT, the hosts file is in C:\winnt\system32\drivers. In Windows 9x, the hosts file is in C:\windows. Note that the hosts file has no extension; if you save the file with an extension, this workaround will fail.

Open the hosts file and edit it to include the line

127.0.0.1 <adserver>

where adserver is the server you want to block. The next time a pop-up ad attempts to open, it won't be able to find the server because the server is now pointing at your computer. The message Cannot find host will load in the background rather than the pop-up ad. Editing the hosts file has become so popular that entire Web sites are dedicated to maintaining replacement hosts files. However, you might need to experiment to ensure that blocking a Web site's pop-up ads won't interfere with the site's functionality in case you want to view the Web site. I suggest blocking DoubleClick's and ValueClick's servers, as well as other big offenders.

Using this method will make browsing the Internet easier. In addition, you can use the method in conjunction with your organization's security officer for more advanced purposes, such as preventing spyware functionality.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.