|
Use the HOSTS File to Block Web Sites
---------------------------------------------------------- Permission is granted for the article below to forward, reprint, distribute, use for ezine, newsletter, website, offer as free bonus or part of a product for sale as long as no changes are made and the byline, copyright, and the resource box below is included. ---------------------------------------------------------- Use the HOSTS File to Block Web Sites
By Stephen Bucaro
When you type a domain name into your Web browser, Internet Protocol contacts a computer that is a domain name server to look up the IP address of the Web site. In the early days, the Internet didn't need domain name servers. Every computer had a file named HOSTS that listed the domain name and IP address of the systems connected to the Internet.
Even today when your Web browser needs to resolve a domain name to an IP address, it first looks for a file named HOSTS on the local computer. In Windows NT, the HOSTS file is located in c:windowssystem32drivers. In Windows 9x, the HOSTS file is located in c:windows.
Because the HOSTS file is no longer required, you may not find it on your computer. Instead, you might find a file named HOSTS.SAM, the SAM extension meaning "SAMPLE". You might also find a file named LMHOSTS. The LMHOSTS file was used to resolve NetBIOS names to IP addresses.
The HOSTS file is simply a text file with a list of IP addresses and their respective domain names. You can open the file with Windows Notepad. The HOSTS file may list only one IP address, the loopback address, as shown below.
127.0.0.1 localhost
To block a Web site, enter an IP address that is not allowed for the Web. For example, any IP address with the first digit of 0 would be on the local network. Any IP address with the first digit of 127 is looped back. Then map that IP address to the domain name that you want to block.
For example, suppose you want to block a porn site that your teenager has been visiting, you might add an entry like the one shown below.
127.0.0.2 www.pornsite.com
Banner ads are usually hosted on an advertiser's domain and linked to sites all over the Web. Suppose you want to block annoying banner ads displayed at a site that you visit frequently. You might add an entry like the one shown below.
127.0.0.3 www.adserver.com
Then when a file from that domain name is requested, instead of the porn site or the banner being displayed, the browser will display the message "The Page Cannot be Displayed".
When you save the HOSTS file after editing, make sure that the file name does not have an extension. Sometimes Windows Notepad adds the extention .txt.
The HOSTS file is a quick, easy way to block access to a Web site. But if you use this method to block a porn site that your teenager has been visiting, make sure they don't find this article. ---------------------------------------------------------- Resource Box: Copyright(C)2002 Bucaro TecHelp. To learn how to maintain your computer and use it more effectively to design a Web site and make money on the Web visit http://bucarotechelp.com To subscribe to Bucaro TecHelp Newsletter Send a blank email to mailto:bucarotechelp-subscribe@topica.com ----------------------------------------------------------
About the Author
None
Stephen Bucaro
More Articles
Cheap Web Package Hosting - How to Minimize Costs - Brian Thorn There are several steps you can take to help minimize costs with a web hosting package. Some require some effort on your part while others are simply a matter of common sense. No matter what your particular needs are, you'll likely find that there...
Elements of Web Hosting - Daniel Punch
When you first start out trying to get a site on the Internet everything seems so confusing. Obtuse acronyms flow freely through the 'Beginner Friendly' information sites and definitions can be hard to come across. The main reason for this is...
Mesopia.com introducing new cost effective and cutting-edge load balancing web hosting solutions for small to medium size businesses. - Jay Higdon OKLAHOMA CITY, OK (USA) - September 02, 2004 - Today, Mesopia.com, a dedicated hosting services provider offering cost-effective and fully managed web hosting solutions, has announced that it has released its new series of powerful load balanced...
Web Hosting: To Switch or to Stay? - Joelene Wickens Orlando
That’s a question that can only be answered by you. Depending on your current status and relationship you have with your provider, along with your evolving business objectives and needs, can determine what course of action to pursue. What are...
Webfarms: The Only Way To Host! - Brad Kingsley Networks can be configured to be so incredibly redundant now - for reasonable prices - that there is no excuse for a data center not to achieve five nines (99.999%) of availability. But what about the servers and applications? Why spend so much...
Keep your web host from costing you money - Michael Lynn Now that you’ve probably just spent hundreds of hours and possibly even thousands of dollars to build your web presence, one of the most important decisions you’ll make next is where to host your website. Choosing a Platform It may be true...
Virtual Private Servers (VPS) Web Hosting by www.vipwh.com - Paras Shah A Virtual Private Server (VPS), also referred to as Virtual Dedicated Server (VDS), provides the features of a dedicated server for multiple web hosting customers to share. At first instance it sounds contradictory, how can you have a dedicated...
Reseller Web Hosting - A Cheaper Alternative? - Jeff Usher There comes a time when the internet bug hits us all and we tend to acquire a wealth of domain names and web sites to feed our frenzy. We start out with the best intentions, set up a personal home page with a few details about ourselves, then...
Dedicated Server vs. Co-location Web Hosting by www.vipwh.com - Paras Shah So - you know shared hosting no longer cuts it, and your single office connection is not enough to host a web server - so which is best, leasing a dedicated server or buying your own server and co-locating it someone's data center?
Difference ...
Advanced Hosting for the Mission Critical Web Presence - Vincent Bezzina As companies that conduct their business online have proliferated, hosting of those websites that provide the primary point of contact for transaction of business has become highly mission critical; having these sites go offline or perform poorly...
VIP PowerNet (VIPWH) Launches Windows Web Hosting - Paras Shah VIP PowerNet, Inc., one of the nation's leading Internet service providers, today announced the addition of a Windows-based solution to its suite of business class Web hosting services. Geared toward small businesses, the new Web hosting product is...
What you should know about your web host. - Raamakant S Yesterday I received a nice email in my inbox, I read that short and interesting email, it was like 5 to 6 lines max, at the end was a link which I was asked to click on. I did exactly that. I wait for about 1 minute but no page downloaded. I...
|