Go Back   Persianhub > Information Center > General Help > Important Threads and Useful Information

Important Threads and Useful Information Here you can find all the important threads and get some useful information

Reply
 
LinkBack Thread Tools
Old 09-07-05, 22:36   #1 (permalink)
Staff
 
Prodigy's Avatar
 
Join Date: Feb 2004
Location: U.A.E, Dubai
Posts: 2,651
Credits: 14,363
Thanks: 130
Thanked 497 Times in 258 Posts
Send a message via MSN to Prodigy Send a message via Yahoo to Prodigy Send a message via Skype™ to Prodigy
IT Tutorials - HOSTS


HOSTS

What is the Hosts file?

You can begin blocking ads and help keep yourself from being tracked by using the Hosts file with Windows and other operating systems.

What is the Hosts file, and how does it stop ads and tracking?


The Short Answer:


The short answer is that the Hosts file is like an address book. When you type an address like www.yahoo.com into your browser, the Hosts file is consulted to see if you have the IP address, or "telephone number," for that site. If you do, then your computer will "call it" and the site will open. If not, your computer will ask your ISP's (internet service provider) computer for the phone number before it can "call" that site. Most of the time, you do not have addresses in your "address book," because you have not put any there. Therefore, most of the time your computer asks for the IP address from your ISP to find sites.

If you put ad server names into your Hosts file with your own computer's IP address, your computer will never be able to contact the ad server. It will try to, but it will be simply calling itself and get a "busy signal" of sorts. Your computer will then give up calling the ad server and no ads will be loaded, nor will any tracking take place. Your choices for blocking sites are not just limited to blocking ad servers. You may block sites that serve advertisements, sites that serve objectionable content, or any other site that you choose to block.


The Longer, More Technically Oriented Answer:


The "Hosts" file in Windows and other operating systems is used to associate host names with IP addresses. Host names are the www.yahoo.com addresses that you see every day. IP addresses are numbers that mean the same thing as the www words - the computers use the numbers to actually find the sites, but we have words like www.yahoo.com so humans do not need to remember the long strings of numbers when they want to visit a site.

For instance, the host name for Yahoo! is www.yahoo.com, while its IP address is 204.71.200.67 Either address will take you to Yahoo!'s site, but the www address will first have to be translated into the IP address. If you type in the IP address directly, your computer will not have to look it up.

A series of steps are used when searching for IP addresses that go with these host names. The first step, and the one that concerns us here, is the hosts file on your local computer. The Hosts file tells your computer what the name is in numbers so the computer can go find it. If the IP address is found in your Hosts file, the computer will stop looking and go to that site, but if it is not it will ask a DNS computer (domain name server) for the information. Since the search ends once a match is found, that provides us with a mechanism to block sites we have no interest in. You may block sites that serve advertisements, sites that serve objectionable content, or any other site that you choose to block.

We can put names and addresses into the Hosts file so your computer does not have to ask a DNS server to translate the domain name into an IP number. This speeds up access to the host site you want to see because your computer no longer has to query other systems on the Internet for the address translation. When you type in a web address like www.yahoo.com, the host name portion of the web address is translated into an IP address before the site is accessed. If you put Yahoo!'s host and IP settings into your Hosts file, it would load a little quicker because your computer doesn't have to ask another to translate where to look for Yahoo!

Computers have a host address of their own - it is known as the "localhost" address, with an IP address of 127.0.0.1 which it uses to refer to itself. If you associate another computer's host name with your localhost IP address, you have effectively blocked that host since all attempts to access it will lead back to you. That is how we will block sites using the Hosts file. We will tell our computer that the IP address of the site we want to block is our own address. That way, our computer will not ever leave and go looking for the site we are blocking - which keeps that site from appearing because the computer thinks it has found the site and displayed it already.

Many web sites have links to other servers for the retrieval of advertisements. In the case of those web servers, the browser will quickly fail to locate the requested data (scripts, images, etc.) from the advertising server because we told our computer to look for the information on itself - of course it won't find any of it and will quit looking for it - and will continue loading the pertinent portions of the page you want to see. This will keep your computer from even talking to the ad servers, and thus you won't see the ads, they can't put cookies on your hard drive, and you can't be profiled by them.
__________________
Prodigy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-07-05, 22:36   #2 (permalink)
Staff
 
Prodigy's Avatar
 
Join Date: Feb 2004
Location: U.A.E, Dubai
Posts: 2,651
Credits: 14,363
Thanks: 130
Thanked 497 Times in 258 Posts
Send a message via MSN to Prodigy Send a message via Yahoo to Prodigy Send a message via Skype™ to Prodigy
Benefits of the Hosts File:
[list=1][*]Uses less resources:

By using a function built into your computer, you will be able to block advertising sites (or any other site you wish) without the need for any extra programs. This will cut down on memory and processor usage, which will free up your resources for other tasks.
[*]Works on connections other than HTTP:

Most ad-blocking programs will only intercept IP calls going to the HTTP (or web) port on your computer. Other transfers can still get through. The Hosts file, however, will block IP calls on any port, whether it is HTTP, FTP, or whatever else you happen to be doing.
[*]Eliminate many tracking and privacy concerns:

By intercepting the IP calls before they ever leave your computer, the Hosts file can prevent advertising and tracking companies from ever even knowing you are viewing a web page. This will keep them from profiling you and help you keep your privacy. All sites in the Hosts file entered with a 127.0.0.1 address will never be accessed. Sites that are not in the Hosts file may still track you and send you ads.
[*]The Hosts file is configurable:

Rather than relying on others to decide what sites to block for you, you may edit the Hosts file entirely on your own. This means you can put any site you wish into the Hosts file and that site will not be able to be accessed. You can use this to block advertisers, trackers, or sites you would not want your small children to see. You get to decide entirely what you wish to block, and you don't have to depend on someone else's judgement!
[*]Increased browsing speed:

By placing sites into your Hosts file with their correct addresses, your computer does not need to ask another computer where to find a site. This can significantly speed up your surfing experience because your computer will go straight to that site instead of having to ask directions. Also, by keeping ads from being loaded using the blocking technique in the Hosts file, web pages will be viewable much more quickly since they won't have to load a lot of fancy graphics.[/list=1]
__________________
Prodigy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-07-05, 22:37   #3 (permalink)
Staff
 
Prodigy's Avatar
 
Join Date: Feb 2004
Location: U.A.E, Dubai
Posts: 2,651
Credits: 14,363
Thanks: 130
Thanked 497 Times in 258 Posts
Send a message via MSN to Prodigy Send a message via Yahoo to Prodigy Send a message via Skype™ to Prodigy
Some restrictions on the Hosts file:
  1. It will not work with wildcards, such as *.whateveryouwantgoeshere.com.
  2. It will not work with URL's that begin with IP numbers.

    IP numbers are the numerical equivalent of the www.somesitenamehere.com address, and that is what your computer actually uses to find the web page. The names are there so that humans don't have to remember long strings of numbers. You would need to find the www.whatever.com address that the IP number represents, and then block that name instead of using the IP number. For example, Yahoo!'s address is www.yahoo.com, and its IP address is 204.71.200.67 We can block www.yahoo.com but not the IP address. The reason for this is that Hosts is used to determine IP addresses. If we already know the IP address, Hosts will not be consulted and so can not block the site. I do not recommend actually blocking Yahoo! though, as it is a great search engine!
  3. It will not work with ads that are served from the same site you are viewing.

    The reason for this is that the Hosts file must block an entire site, and can not block subdirectories or pathnames on a site. For example, you could not block www.netscape.com/ads/ because you can't block subdirectories. You would need to block the entire www.netscape.com server, and that would leave you without access to Netscape's site. So you will have to use a different method to eliminate ads that come from the site you are viewing, such as an ad-blocking program.
  4. It may cause some sites to quit working properly.

    If you put the wrong server into your hosts file, it may mean that certain websites will no longer be viewable as they normally would be. To remedy this, remove the entry of the site you wish to unblock from your hosts file.
__________________
Prodigy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-07-05, 22:37   #4 (permalink)
Staff
 
Prodigy's Avatar
 
Join Date: Feb 2004
Location: U.A.E, Dubai
Posts: 2,651
Credits: 14,363
Thanks: 130
Thanked 497 Times in 258 Posts
Send a message via MSN to Prodigy Send a message via Yahoo to Prodigy Send a message via Skype™ to Prodigy
How to use the Hosts File:

Detailed Instructions:
[list=1][*] Download the hosts

In many cases this can speed the loading of web pages by not having to wait for these ads, banners, hit counters, etc. to load. This also helps to protect your Privacy by blocking servers that track your viewing habits, also known as "click-thru tracking" or Data Miners.

Note: As time has progressed the focus of this project has changed from just blocking ads/banners to protecting the user from the many parasites that now exist on the Internet. It doesn't serve much purpose if you block the ad banner from displaying as most other HOSTS files do, but get hijacked by a parasite from an evil script or download contained on the web site. The object is to surf faster while preserving your Safety, Security and Privacy.

* Click To view the HOSTS file in plain text form. (289 kb)

Note: The text version also makes a terrific reference for determining culprit URLs

* Download: hosts.zip [right-click - Select: Save Target As]
[*] Try to locate any existing hosts file on your computer:

Unzip in a "temp" folder and place in the appropriate installed location:
Note: the below locations are for the default paths, edit as needed.

Windows XP = C:\WINDOWS\SYSTEM32\DRIVERS\ETC
Windows 2K = C:\WINNT\SYSTEM32\DRIVERS\ETC
Win 98\ME = C:\WINDOWS


There is no need to install, turn on, or change any settings. Windows automatically looks for the existence of a HOSTS file and if found, checks the HOSTS file first for entries to the web page you just requested. The 127.0.0.1 is the location of your computer, so when the entry (example) "ad.doubleclick.net" is requested your computer thinks 127.0.0.1 is the location of the file. When this file is not located it skips onto the next file and thus the ad server is blocked from loading the banner, Cookie, or some unscrupulous javascript file.

In case you're wondering ... this all happens in microseconds, which is much faster than trying to fetch a file from half way around the world. Another great feature of the HOSTS file is that it is a two-way file, meaning if some parasite does get into your system (usually bundled with other products) the culprit can not get out (call home) as long as the necessary entries exist. This is why it's important to keep your HOSTS file up to Date.

CAUTION: If you find that you already have a "Hosts" file on your computer, I recommend that you back it up onto a floppy or into another directory on your hard drive so that you may restore it if you do not like the results of the ad-blocking, or in case something else goes wrong while you are trying to set this up. It is always better to be safe than sorry in the event of an unforeseen mishap. Please make a backup copy.

[*]You only need to perform this step if you find that you have an existing Hosts file:

Open your hosts file in Notepad. It should look something like this when you open it:


# Copyright (c) 1998 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP stack for Windows98
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost



If your Hosts file looks exactly like that, then you may simply make a backup copy of it and then delete it. After deleting it, extract the HOTS file (the one that you downloaded in step 1) into either your c:\windows (for Windows 95/98/Me) or your c:\winnt\system32\drivers\etc (for Windows NT/2000/XP Pro) folder and proceed to the next step. Windows XP Home may use the c:\windows\system32\drivers\etc\ directory.

If other data is in your Hosts file, you will definitely want a backup before you proceed, so make one now. If your Hosts file looks like the one above, but has extra entries, you will need to do a little more work. For example, if you use the program CookieCop Plus, your Hosts file would look like above with the following entries after the comment section:

127.0.0.1 localhost
127.0.0.1 CookieCop

If you find any extra entries in your existing Hosts file, you will want them in your new Hosts file as well. The solution is to make a backup of your current Hosts file, and then extract the HOSTS file (the one you downloaded in step 1)to the folder that contained your existing file. Next, you will want to open the new Hosts file with a text editor (if you have Windows 95/98/Me/NT, the list might be too big for Notepad and will open in Wordpad - if you use Windows 2000/XP, this shouldn't happen).

After you open the file with a text editor, copy the lines from your backup Hosts file into your new Hosts file. You will only need to copy the lines that start with "127.0.0.1" or another similar IP number, and add them to the bottom of your new list. Save the file in your text editor. You will want to make sure that the file is saved without an extension. You can do this by typing this into the "save as" line when you save the file:

"Hosts"

Make sure you use the quotes to keep the file from being saved with an extension (like .txt). If you find the file has an extension, you will need to get rid of the extension by renaming the file in Explorer to simply "Hosts".
[*]If you have a proxy server:

You should only need to do this step if you use a proxy server. Examples of proxy servers include: WebWasher, CookieCop Plus, and a web cache server provided by your ISP. If you don't use a proxy server you can skip to step (5).If your hosts file does not seem to be working for you and you skipped this step, try coming back and completing this process.

In IE - choose tools:internet options:connections and choose your connection. If you are using a proxy server, make sure the box called "bypass proxy server for local addresses" is checked.

In Netscape - go to Edit: Preferences: Advanced: Proxies and click the manual setting. Then click on view and type "127.0.0.1" into the exceptions box at the bottom.
[*]Warning in case you missed this in earlier explanations:

If a site is in your Hosts file, and has its address set to 127.0.0.1, that site will not be able to be loaded from the web. This is how advertisements are kept out, but it also means you may not be able to view a site you want to see. To view a site that seems inaccessible - look in your hosts file for the "www.whateveraddressyouarelookingfor.com" entry and remove that line. You can do this with Notepad or any other text editor. Save the file when you are done. You will then be able to view that site.[/list=1]
__________________
Prodigy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-07-05, 22:38   #5 (permalink)
Staff
 
Prodigy's Avatar
 
Join Date: Feb 2004
Location: U.A.E, Dubai
Posts: 2,651
Credits: 14,363
Thanks: 130
Thanked 497 Times in 258 Posts
Send a message via MSN to Prodigy Send a message via Yahoo to Prodigy Send a message via Skype™ to Prodigy
Frequently Asked Questions
  1. I'm using a Proxy from my ISP, but the HOSTS file doesn't seem to work?
  2. After using the HOSTS file my machine seems slower? (XP/2K)
  3. Why doesn't my Back Button return me to the previous page?
  4. How do I Edit the HOSTS file?
  5. Why do I see an Action Cancelled message?
  6. How do I rename the HOSTS file?
  7. How do I lock the HOSTS file to prevent other users from changing it?
  8. Can I use the HOSTS file if I'm running a "Server"?
  9. Are there any Utilities to monitor and protect the HOSTS file?
  10. How do I troubleshoot a problem with my connection?
  11. How do I contribute a listing for the HOSTS file?
  12. Can I be notified of updates to the HOSTS file?
  13. I'm not sure how to Extract (unzip) the HOSTS file
  14. Why do I get a Password Prompt when unzipping the download?
  15. How do I know all these entries are valid?
  16. What are all these comments after the entries?
  17. For Issues with Downloading or Extracting the HOSTS file
  18. How do I know if the HOSTS file is working?
__________________
Prodigy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-07-05, 22:41   #6 (permalink)
Staff
 
Prodigy's Avatar
 
Join Date: Feb 2004
Location: U.A.E, Dubai
Posts: 2,651
Credits: 14,363
Thanks: 130
Thanked 497 Times in 258 Posts
Send a message via MSN to Prodigy Send a message via Yahoo to Prodigy Send a message via Skype™ to Prodigy
I will post the answers to the F.A.Q section as soon as possible the answers are not complete yet. I apologize for this inconvenience.
__________________
Prodigy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  Persianhub > Information Center > General Help > Important Threads and Useful Information

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Resolved] Requesting vtc Adobe After Effects 6.5 Advanced Tutorials mehran007 I am Looking For ... 1 22-11-07 19:04
Italy Dejected As Poland And Ukraine Become Joint Euro 2012 Hosts == KK == Soccer 0 18-04-07 19:21
IT News - Hardware Tutorials [1] Ehsan Z. General Help 1 05-06-05 11:35


All times are GMT -5. The time now is 16:24.

RSS Feed w3-css w3-xhtml Join us in Facebook
Rules Terms of Services Policy Advertisement

Designed by LastBrush
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
2004 - 2009 © Persianhub Network