Talk:Hosts (file)

message: Added a history section to provide background on hosts files origins and uses.
On my to-do list for this article:
 o Fix the crappy formatting, spelling errors, etc
 o Fix all the technical ambiguity, remove OS prejudices, etc.
 o Move chunks of the article into a more appropriate article, such as "Hosts_File_Filtering" or something
In general, my aim is to make this NOT look like a freaking IT tech support forum.
--Jeff The Riffer 15:07, 4 August 2006 (UTC)
thread_title: Improving this Article

message: hmm, i just noticed something.  why is this page titled "Host file"?  But, in the Windows environment, it's referred to as a "HOSTS file".  And is a file called "HOSTS" which resides in the C:\Windows\System32\drivers\etc directory. —The preceding unsigned comment was added by 24.110.231.35 (talk • contribs) 18:55, 12 July 2005.
:Just to say that on Linux, most distributions (all?) use /etc/hosts; a move to Hosts file would make sense to me --Lox (t,c) 08:43, 12 January 2006 (UTC)
thread_title: Proposed move from [[Host file]] to [[Hosts file]]

message: I removed
 (Note that ZoneAlarm may itself be spyware.  See this article.)
from the article as it a) isn't relevant and b) seems to be an exaggeration. Sum0 21:10, 3 April 2006 (UTC)
thread_title:  Zonealarm spyware 

message: Changed "Commercial software like ZoneAlarm and Spybot - Search & Destroy have a feature to "lock" the hosts file", as Spybot is not commercial software. --80.61.118.43 12:25, 16 April 2006 (UTC)
thread_title:  Rephrasing 

message: The 'help' in the section is Windows-only.  Of course, Windows IS the main enabler of malicious requests everywhere.
It reads like an advertisement... actually, it IS an advertisement for some 'Windows Defender' rubbish.  I hope they're paying Wikipedia for that space.
Maybe as a guideline, any "help" in an article of this sort should link to an article about computer security.
Generally, the whole spyware/malware/virus problem boils down to Microsoft's unique insistance on making it 'convenient' for ignorant users by making them log on as 'Administrator' (root) by default.  It doesn't help that the 'Home' version of Windows XP that's shipped in most consumer boxes has extremely limited administrative capabilities which give you an extreme radio-button selection of "Omnipotent: Screw Me At Will" or "Somewhat Less Omnipotent: Screw Me Somewhat Less".  If you do software development work, you'll need to run a 'Workstation' or 'Server' version of Windows to have the sort of control you need.  For most casual users (and kids) a 'User' level account settings will be sufficient for virtually any normal use, though the default 'user' account still allows too much.  The question to ask yourself is "$50 extra for the 'Workstation' version, or $500 over the next few years buying junk to 'scan' your computer that doesn't work?"
Most of the garbage that vendors dump on the market to 'protect' users from these 'threats' is nothing more than a patchwork of bandaids cobbled together over the root (sic) problem of excessive login privileges for routine work/entertainment use.  Believe me, you really don't want everyone in the house (or office) having privileges to download something they see on a pop-up ad and click "Yes" when it prompts to install... unless you LIKE doing full virus scans weekly and having half a dozen 'protect me' kludges scanning everything on your computer all the time, slowing everything to a crawl, and then re-installing Windows every few months because the damage adds up.
When just editing documents, emailing, browsing the web, etc., a 'user' account (one with limited privileges to change files in a designated place - for windows it might be their subfolder in 'Documents And Settings' and for Unix/Linux users it might be their home folder) is very adequate. 
In general, one should only log on with admin/root privileges when deliberately making changes to the system (installing/removing devices and software, adding/editing accounts, that sort of thing).  Generally one shouldn't engage in any 'risky' download/browsing behavior while logged in as admin/root. Log off and back on again as a 'user' as soon as you finish.
All well written software that 'behaves' will run fine with user privileges.  Software that attempts to do more than the 'user' has privileges to do will fail to modify 'important' files, and (if written well) tell the user why.  Older software that makes very dumb assumptions about keeping files in their "Program Files" folder, or modifying system-level registry entries will fail - and this is what Microsoft has made all users into 'Administrators' to enable, so the software based on their earlier, even more flawed non-security model can all still work, while leaving the door wide open for everything else.
If you need to do something, it takes only a minute to log off and log in as 'Administrator' (or type 'su' to become root) and do what needed to be done (usually install a driver or piece of software, occasionally give your 'user' account an extra privilege to enable something), then log back in with your user account.  Some software even prompts for the 'Administrator' (or root) password and does this step for you, granting temporary permission to do what you launched it to do.
It should be noted that if you're going to make your current account into 'user', that you'd better make an 'Administrator' enabled one FIRST.  I have never met a common Windows user with 'spyware' and 'virus' problems who knows their Administrator account password (many PCs ship to the user brand new and don't have an 'Administrator' password written down anywhere).  Set a password on it you'll remember, and write it down anyway and file that away where you can definitely find it.  It doesn't have to be the 'Administrator' account.  Just an account with 'Administrator' privileges.  ONLY after making that administrator account (or at least verifying you can log in as 'Administrator') should you lower your privileges to a 'safe' level.  Then make sure your productivity software and toys still work.  If some downloaded toy complains, uninstall it and find another one.
Oh, and just a reminder: BACK UP YOUR DOCUMENTS/PICTURES/ETC.  A USB2 hard disk big enough to back everything up, and fast enough to do it relatively quickly is dirt cheap compared to the time needed to re-create it all.  Best practice is to plug the USB drive in to perform backups, and leave it unplugged, powered off and disconnected the rest of the time.  Store the USB drive somewhere separate from your computer (in case of fire, water damage, etc., there will be better chance that ONE hard disk will survive.)  If you have a safe backup, there's nothing at all that can happen to your computer that will harm the backed up copies as well.  Various vendors make backup software that makes the process incremental and painless (i.e. after the first backup, a weekly backup will usually take a minute or two), but you can just use XCOPY (or ROBOCOPY or 'rsync') to do it if you're comfortable with command line tools.
And one last security tip: Put your most sensitive, sacred, personal things on an EEPROM (USB or whatever memory card format - Back that up, too!)  Put all of your sensitive website links and passwords in a file on that stick, too.  Clear those automatically entered passwords out of your browser (at least to 'sensitive' things) completely.  Now if someone somehow does obtain access to your computer (stolen, accessed locally while you're away, remotely connected, etc.) they find nothing but mundane and uninteresting (and above all HARMLESS) junk.  Use that EEPROM like a key and plug it in ONLY when you need that private data.  Clear the cache and temp folders after each use of the key.  These keys are pretty cheap compared to both losing a notebook AND realizing that your tax records and every login to every bank and credit account are on it, too.  If you leave out the MP3s and terabyte of 'videos' you downloaded, a 2GB EEPROM will store anything of significance for most people, and can be hidden much more safely, securely and readily than other media.  Mine's even water resistant (or you could keep it in a 'zip-lock' bag.)  The computer isn't the important thing, the data on it is what you're worried about.  There are additional steps for the extra-paranoid, but that would be one long article.
The EEPROM its self can even be encrypted - but don't count on that encryption protecting data from authorities.  If that's a concern, get a tiny-sized one for a digital camera (most cameras have a USB cord and can be read like a hard disk) that you can bite down on and crush if it's a question of "Lost data or prison?"  It's a lot harder to recover data from a mashed or fried chip than a disk of whatever type. —Preceding unsigned comment added by 72.154.159.144 (talk • contribs) 16:18, 24 May 2006
---
All of this advice is useful with some exceptions.
0. Please sign your name to stand behind these statements!  I am a creator of one of the blocking hosts files, and it defends more than just Microsoft Windows systems.  I work almost 85% of the time using Linux, not MS-Windows.  It is just a fact of life that most people are using Windows.  Until that fact changes there is nothing you or I or anybody else can do about it.  But more to the point, what does any of the previous have to do with a hosts file?  If you are saying that by just dropping my privileges that is all that is required, you are a fool.  Read my last point and you will understand why.
1. For better or worse, the Microsoft Windows OS sometimes makes it very difficult to do things with restricted accounts, most notably in updating anti-virus, anti-spy and other things.  This is because of the heritage of Windows coming from a single user environment as opposed to a multiple user and multi-logged on environment.  Just do a "ps -eadf | more" or "ps -gaux | more" on some Unix systems.  You will see more than one and more than the extra one being all root on them.
2. The other reason is that Microsoft's NTFS system is rather primitive since it didn't have the idea of file ownership.  If IBM had followed their own OS / 400 (then AS / 400) people, OpenVMS, or Unix in designing the HPFS which NTFS descended from, many of the present day problems could have been avoided.
3. Don't assume that Linux, Mac OS-X, et al, don't have problems with web sites.  They do.  They are of course protected from Windows binaries.  Active-X is an Internet Explorer problem and can be avoided by the use of any other browser on Windows.  But how many MS Windows users have you tried to pry away from using IE?  But Linux, Mac OS-X, and the various BSDs can have just as many problems when it comes to JavaScript, Java, and Flash Player exploits. Macintosh is also susceptible to any exploits that use QuickTime player since that is available for the Macintosh (but not for Linux). There is also no difference when it comes to tracking cookies. They are just as bad on all platforms. Although I and others have created a PAC file, nothing blocks things colder than a blocking hosts file.
4. The one hosts file I wished was listed that isn't is Camelon's.  When you people started putting in links I was very distressed that you didn't point to the MVPS hosts file, Camelon's, and HPHosts.  Almost all of the others are deriving from those three.  At one time MVPS was in there and somebody has removed it.  The only hosts that are in my BadHosts file that aren't in the MVPS hosts file are Porn and Casino sites that fall through our PAC filter.  I send on all bad sites to the author of that file.  It was very distressing for you people to ignore the big three once you started listing things.
5. Encryption of a disk is absolutely useless until the machine is shut down.  Separate file encryption does have merit, but only as long as you don't have a key-logger on your system.  If they are on your system and stole your keys and know your pass-phrase, they are home free.
6. Least privileges only go so far in protecting a system.  On Windows there is nothing to prevent people from doing an infection locally.  By that I mean that they can put their malicious code either in the user's Start folder, or a link pointing to where it is in the user's Start folder, or make entries in the user's Run or RunOnce or other Run registry keys to where the malware is installed.  Vista has done nothing that prevents this from happening either.  These LOCAL things that only apply to one user are easy to do.  Macintosh and Linux systems have some well defined local user folders as well, and copying a trojan and key logger into their local binaries folder (for example ~/bin for Linux) and altering their startup scripts for their shell to make sure it is running when the user logs in can do just as effective a job of reading keyboard strokes as the key-loggers on Microsoft Windows.  In short, least privileges will NOT protect against this type of exploit. Even worse the potential exists on all platforms.  Many if not most sites are already halfway there because they already identify your OS and your browser including all plugins.  All that is left is to exploit say, Java to shove the malware into place and make sure it is automatically started.  The only reason it hasn't been done yet on Macintosh and Linux is because of the small numbers of machines running those operating systems.  That is going to change.
In conclusion, I have nothing against the principle of least privileges.  It SHOULD be done!  But depending on it as a panacea that will cure all the problems is extremely naive.  Also, shifting to using Mac OS-X, Linux, or one of BSDs will only get you so far.  I think we should put up the code for what was at the mostannoyingwebpage.org.  It trapped you with nothing but JavaScript, and it is getting more and more frequent that the JavaScript exploits work just as well on the Mac and Linux systems as they do on Windows.
hhhobbit 09:56, 24 June 2007 (UTC)
thread_title:  The ROOT Problem 

message: The above article by hhhobbit was over my head, but one helpful (free) tool for us dummies is DropMyRights. You can run IE, Firefox, or any other program at all, without admin privileges, even if you're running as an admin user. It removes the admin privileges from that instance of your browser (or whatever), which may not be a cure-all, but it would surely prevent some types of harm. You just make a shortcut to the lower-privileged version. Note: If you use this, you still have to use your original (full-privilege) version of IE to get MS Updates. They won't work without admin privileges. Again, I'm a dummy, so apologies if any of the terminology isn't correct. Unimaginative Username 03:56, 15 November 2007 (UTC)
thread_title:  Removing the admin privileges from the browser itself 

message: "One use of the hosts file is ad filtering."
The purpose of the HOSTS file is clear, and it's not for ad filtering. It would be more accurate to classify these techniques as something else. —Preceding unsigned comment added by 70.173.102.192 (talk • contribs) 15:18, 23 June 2006 (UTC)
thread_title:  "Use"? 

message: The article says you need a work around for XP sp2. this is not true. MS moved the real Hosts file to the windows\I386 directory, edit that one instead, restart, and your done. —Preceding unsigned comment added by 24.91.171.16 (talk • contribs) 16:18, 13:11, 24 June 2006
That is strange.  I am running XP Home and XP Pro fully patched. I also have W2K partially patched up to but not including their
malware crap which hoses that OS because it caused so many problems.  I no longer use W2K for serious work any more though. Both XP are patched up-to-date.  Adding an entry to %SystemRoot%\system32\drivers\etc\hosts blocks the relevant added host on both XP machines.  Is this some anomaly that happened right after SP2 and went away or what?  I would say that since it works to block a host on XP with the file name I just gave you, you are better off removing this comment altogether.  How many people do you know who are running XP frozen at SP2 with no additional patches if that is what caused it to be moved to the I386 folder?  Actually, I believe this is just a backup of your hosts file that existed pre-SP2.
hhhobbit 17:19, 28 January 2007 (UTC)
thread_title:  a better way in XP  

message: As much as it is helpful to state any product name that would relate to Hosts File, I do not believe it is required as it is a form of advertising, unless someone can prove me wrong...
Reeves 05:43, 25 June 2006 (UTC)
thread_title:  Advertising in article?? 

message: I think the Windows Quirks section of this article should also discuss the lmhosts file. How does this relate to the hosts file? Does Windows attempt to synchronize these at all?
: This article at tek-tips.com seems to discuss it. Perhaps somebody with better understanding of Windows/WINS networking could distill into something for the article? Dharris 14:54, 5 July 2006 (UTC)
thread_title:  lmhosts  

message: Please help clarify the entry in the "aether" disambiguation page: "in internet routing, the term ether is associated with hosts" What the heck is it? (Previously "hosts" was a redirect to "hosts file") `'mikka (t) 17:38, 17 July 2006 (UTC)
thread_title:  Ether 

message: This article also needs a section about hosts file that can be downloaded and installed on user systems. Would be great to have direct links to site that maintain hosts files of known/acknowledged malware sites, adult content sites, etc.
You already have the number one blocking hosts file on the Internet which is MVPHosts.  The number two blocking hosts file which is HPHosts is available here:
http://hphosts.mysteryfcm.co.uk/?s=Download
Nobody has added this so I am adding it.
BadHosts
http://www.hostsfile.org/
http://www.securemecca.com/
I added the HPHosts and Bad Hosts entries to the Hosts section today.
hhhobbit 22:54, 14 February 2007 (UTC)
thread_title:  Add section about downloadable hosts files 

message: I've heard different views detailing the "DNS Client" service on Windows XP (and I assume other versions of Windows with that service).  It's not that Windows "ignores" the HOSTS file, but it tries to load the _complete_ HOSTS file into this "cache", resulting in web surfing/domain name resolution taking very long to work, since it has to go through so many entries.  And well, look at the external links, many of those HOSTS files are greater than 1-2MBs, so having to search through every entry, for every DNS lookup makes Internet sites to seem slow. --70.152.196.25 02:34, 29 August 2006 (UTC)
thread_title:  dns client service 

message: I do not believe that real ad sites should be used as examples in a negative way such as this. It is unfair to single these companies out on such a highly trafficked and is not Neutral. Instead, I think there should be a section on host file syntax before the 'Ad Filtering' section. The syntax section should use the officially sanctioned 'example.com' address. The 'Ad Filtering' section should not show examples, but keep the explanation on how and why it is done. One of the external links could be to a site that provides lists of hostnames to add to your host file. These lists are 
*Far more complete
*Fair to competing agencies by attempting to be all-encompassing
Loplin 01:04, 13 December 2006 (UTC)
replies: text: I went ahead and added the syntax section and removed the 'Ad Filtering' Examples.Loplin 01:52, 13 December 2006 (UTC)

text: *I find the original AdBlock very easy to use and economical of resources. No external file needed. Whenever you see a new ad, just right-click and add its domain to the "Filter" list. A block-list is quickly built up, after which very few new ads appear. Also, use the free NoScript add-on for Firefox. It now has capacity to block I-frames. Blocking scripts and I-frames keeps most ads out. I have near-zero tech knowledge (please keep that in mind if you respond!), but these simple solutions, plus the MVPS Hosts filter, have been very effective. Regards, Unimaginative Username 01:31, 15 November 2007 (UTC)
thread_title:  Ad Filtering 

message: The syntax is described as per comments in the default hosts file on our Windows XP Media Center system, and the syntax on Linux is more elaborate. That is, under linux a host address can definitely be followed by more than one whitespace separated name, but I think a FQN should come first and is presumably considered the "primary" name in some sense - the rest probably "aliases".
I do not know (yet) if more than one name is valid under Windows XP - hasn't worked at all for me but maybe this is not the reason.   I started by copying my linux hosts file to windows, which I thought is what I used to do on Windows 95 and 98. So...
What are the rules on different OSes and versions of them? Can an address ever appear on more than one line (with different names)? Is the Linux syntax the Unix syntax?
Anyway, the current Syntax section is over-simplified or Windows specific.
Jimwrightbe 21:51, 4 February 2007 (UTC)
thread_title:  Syntax 

message: I can't find an authoritative source as to whether or not a wildcard can be used as a hosts entry, or if simply entering a host's root domain would act as a wildcard.
For example, would this entry:
127.0.0.1   googlesyndication.com
redirect all communication attempts to any/all hosts within the googlesyndication.com domain to the local host so that they would not need their own specific entries, such as:
127.0.0.1  pagead.googlesyndication.com
127.0.0.1  pagead2.googlesyndication.com
???
—Preceding unsigned comment added by 65.93.89.28 (talk • contribs) 15:38, 14 July 2007 (UTC)
replies: text: No, there is no 'wildcard' in hosts. Your example would only lead googlesyndication.com to 127.0.0.1 and not any subdomain. If you want subdomains to be redirected to 127.0.0.1 too then you will need to specify each and every one of them. PPP (talk) 20:15, 18 July 2009 (UTC)
replies: text: Sadly, PPP is correct; the hosts-file format does not support wildcards. And obviously it is impossible to add every potential domain and subdomain you might want to redirect and/or block to it. In that case, you would have to resort to running a local DNS server like DeadWood. It would be a little more complex to configure than a hosts file, but it would give more control and allow for wildcards and other more fine-tuned configuration. Synetech (talk) 02:56, 4 June 2016 (UTC)
thread_title:  Can a wildcard be used for an entry in a hosts file? 

message: I believe the :File:Hostsfile-entry.jpg image is useful in explaining about hosts files and their contents. Through asking at the reference desk, I found out that Spybot - Search & Destroy populated my hosts file. (not me) Maybe the caption can be modified to explain about Spybot. I don't understand how Spybot chooses what to list in the hosts file, but I assume Spybot found adware or something on the listed site. Until the reference desk explained it, I was worried that the site did some unauthorized change to my computer and was worried if the site did other things to my computer.  Others may wonder how or why the site is listed when running that command, and can see that having such sites listed was by Spybot (or similar program) to protect the computer.  If someone else has a better image, that might be fine, but something to illustrate this is helpful. --Aude (talk) 15:11, 30 January 2009 (UTC)
replies: text: As explained in the article, the Hosts file is a text file.  You don't need an image to show text.  You don't need an image to show how to do a DNS lookup, which is what your image showed.  Discussing DNS lookups really isn't even that appropriate here, just point them to dig. Showing an image of a DNS lookup citing a website that has had a long history of apparent conflict between them and wikipedia has no place on the wikipedia.  If the justification for an image is what you can put into a caption, then the image is not needed, just put the text in the article. Wrs1864 (talk) 15:46, 30 January 2009 (UTC)
thread_title:  Hostsfile Image 

message: The following footnotes, which are numbered 5, 6, and 7, respectively, in this version, do not cite any sources nor contain any links to verify them. 
"5. Using the loopback address can be problematic as it redirects requests to the local machine which may be running a web server for a different purpose. Consequently, using an invalid address, like 0.0.0.0 or 255.255.255.0 is safer."
"6. Running a local web server can expose a system to increased external attacks; doing so for this purpose is questionable. Furthermore, a local web server may well be used for other purposes so configuring it to reject unwanted ad requests while fulfilling its primary purpose may be troublesome and the added load may be undesirable."
"7. On some Windows machines, the "DNS Client" service may need to be stopped in order for changes to the hosts file to take effect."
They appear to be someone's own statements, and were most probably intended to be helpful. However, please know that as an encyclopedia article, all significant statements in the article should be sourced, and the "References" section is the place to put those sources and/or links to them. These footnotes, if properly sourced, might properly belong in the article itself. If unsourced, Wikipedia policy would require their removal. Appreciate if the author(s) source them. Unimaginative Username (talk) 09:59, 8 July 2009 (UTC)
thread_title:  Unsourced footnotes 

message: Article read "%SystemRoot%\system32\drivers\etc\ (see note)" - which note? --Chuunen Baka  (talk  • contribs) 14:08, 19 August 2010 (UTC)
replies: text: Fixed Kbrose (talk) 14:20, 19 August 2010 (UTC)
thread_title:  See note? 

message: Twice I added a note about the important difference between a local host file and a network-wide filtering policy.  Unfortunately both were eventually reverted by Kbrose.  I am asking why a section on filtering exists, if it cannot be complete with a mention of its important caveats.  The latest revert can be seen as an "OS-specific cleanup" at  which mostly deleted text I didn't write, but also deleted my entry near the end.  This is not an OS-specific issue, although there were references to common unix software (unix being commonly used as gateways).  Should such a note be added again, but with a reference to a book on network security?  Or will this still be a wasted effort?  Thanks, 66.11.179.30 (talk) 22:00, 23 August 2010 (UTC)
replies: text: I think all of these recipes of secondary use of the hosts file amounted to how-to advice and original research, which is not within WP scope. I don't know what important info you refer to, but if it is to point out that hosts file based methods are not network-wide, then I'd say such trivia is not notable. If you would like to remove all these filter mechanism that are not the intent of this facility, please do so. Kbrose (talk) 23:26, 23 August 2010 (UTC)
replies: text: Bizarre what people think is or is not relevant.  I discovered wikipedia via this page many moons ago.  The chunk Kbrose removed was actually the bit I used to deal with my HOSTS file after moving to win7 a month back...  I don't see it as a "how to" but as an integral part of understanding the HOSTS file.  The IP's posting looked reasonably relevant to me. --Herby talk thyme 07:55, 24 August 2010 (UTC)
replies: text: Objectively, the only thing that there is to understand about the hosts file is that it is a name resolution facility for IP. That is the only purpose it has and once you understand that, everything else falls in place. What creative things one does with a name service function beyond this, may be interesting to some, but is entirely how-to and depends on the service and the software that uses the name lookup. The same creative use can be accomplished by using other name services. We don't include this stuff in the DNS or NIS articles either, as far as I recall. But if it is of interest, you are free to write an article about misuse, abuse, or creative use of name services, if you have reliable references to support the material. Kbrose (talk) 16:45, 24 August 2010 (UTC)
thread_title:  Caveats of using the hosts file as a filter 

message: A dispute seems to exist over the origin and attribution of the location table in this article.
I examined the history of the section and the claimed source wiki.
Based on this I found that the content of the table existed well before the claimed source existed, and that the claimed source likely copied its original content from this article. Claiming a source credit for simply formatting the information into a wiki table is not a valid reason for a citation, as the claimed source is using the identical software and formatting tools created by Wikipedia. Furthermore, the claimed source's owner or creator is engaging itself in promoting the source here, which is a violation of WP:COI and other WP policies regarding self-citing.
There appears no reason to cite the source here. The information in the table is furthermore not a unique intellectual creation of the claimed source, it is simply a compilation of commonly available technical facts of operating systems. Kbrose (talk) 18:42, 1 September 2010 (UTC)
replies: text: Additionally there does appear to be some COI maybe. --Herby talk thyme 21:09, 1 September 2010 (UTC)
replies: text: We went through all this over a year ago.  See discussion above.  I completely replaced the location list at the time, due to incompatible licensing of the content copied from lunarsoft's wiki. See edit here. Tarun then later copied Wikipedia's table into lunarsoft's wiki (without attribution). I originally cited his wiki at the time, but would say it should now be removed because the source itself has changed to effectively be a mirror of Wikipedia.  Wikipedia cannot act as a cite for itself.  --Escape Orbit (Talk) 23:16, 1 September 2010 (UTC)
thread_title: Location table

message: I know Wikipedia isn't a tech support channel, but...
The table says that on 64-bit Windows, the location is "%SystemRoot%\SysWOW64\drivers\etc\".  I've got a couple of 64-bit Windows systems here (Windows Server 2008 Standard, Windows Vista Ultimate, both 64-bit), and neither one has an "etc" folder in %SystemRoot%\SysWOW64\drivers\.  I know it's what the linked support.microsoft.com page says, but that doesn't mean it's necessarily true.  :-)  —Preceding unsigned comment added by 216.163.72.2 (talk) 21:26, 26 October 2010 (UTC)
thread_title:  Location on 64-bit Windows 

message: ;Custom HOSTS files can speed up of resolutions of IP addresses:
This is possible using the local HOSTS file also - This is known as "hardcoding" an IP-address-to-HOST/DOMAIN name. Doing so locally results in far faster resolutions of hosts/domain names to IP addresses, since this typically takes 30-hundreds of milliseconds response from remote DNS Servers (which have also been subject to "DNS Poisoning" redirects for exploit over time and many recently also, per http://en.wikipedia.org/wiki/DNS_cache_poisoning ), vs. mere 7-10ms access of the HOSTS file from harddisk (or faster once the hosts file is cached into memory either by the local kernelmode diskcache subsystem in modern operating systems, or when using smaller hosts files, as larger files aren't good with the local DNS clientside cache service in Windows (which has a flaw in it with them due to a fix-size buffer/array/list/queue in use, noted here for work-arounds vs. it http://winhelp2002.mvps.org/hosts.htm see below next)... apk
Possible Workaround for using the MVPS HOSTS file and leaving the DNS Client service enabled (set to: Automatic)
If you find after a period of time that your browser seems sluggish with the DNS Client service enabled you can manually flush the DNS cache
Close all browser windows ... open a "Command Prompt" from the Start Menu > All Programs > Accessories > Command Prompt
(type) ipconfig /flushdns (press Enter) Then close the Command Prompt ...
A better Win7/Vista workaround would be to add two Registry entries to control the amount of time the DNS cache is saved.
Flush the existing DNS cache (see above)
Start > Run (type) regedit
Navigate to the following location:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters
Click Edit > New > DWORD Value (type) MaxCacheTtl
Click Edit > New > DWORD Value (type) MaxNegativeCacheTtl
Next right-click on the MaxCacheTtl entry (right pane) and select: Modify and change the value to 1
The MaxNegativeCacheTtl entry should already have a value of 0 (leave it that way - see screenshot)
Close Regedit and reboot ...
As usual you should always backup your Registry before editing ... see Regedit Help under "Exporting Registry files"
* THE WORK-AROUND I HAVE FOUND THAT WORKS BEST WITH LARGER HOSTS FILES is to simply shut down the local DNS clientside cache for DNS via services.msc (setting its startup type to disabled) with larger HOSTS files. This saves CPU cycles, RAM, & other forms of I/O used by said service once it is turned off (plus electricity as well as a bonus by NOT running a service that you do not need & that malfunctions with larger HOSTS files in the 1st place - the kernelmode local diskcache subsystem in ANY modern Operating System will then cache the HOSTS file, like it does ANY FILE (& just like the DNS local clientside cache service, albeit minus the "lags" it introduces with larger HOSTS files))... apk
---
;Custom HOSTS files can speed up websurfing:
Hosts can very noticeably speed up internet websurfing by blocking out banner ad content which also frees up bandwidth, and gets a websurfer more for his money paid. A good read by Mr. Oliver Day of SECURITYFOCUS.COM on that note is here http://www.securityfocus.com/columnists/491 by Mr. Oliver Day of SECURITYFOCUS.COM ... apk
---
;Custom HOSTS files help for reliability of site access & for added security vs. DNS poisoning:
Use of hardcoded IP addresses to host/domain names can help circumvent attack & exploit by DNS poisoned DNS servers (via using hardcodes of sites you often visit, for example, as noted above for speed) - once more, this link has a good read on that also http://www.securityfocus.com/columnists/491  by Mr. Oliver Day of SECURITYFOCUS.COM ... apk
---
;Custom HOSTS files help security vs. DNSBL:
HOSTS files also can be used to circumvent DNSBL http://en.wikipedia.org/wiki/DNSBL also (where DNS block out sites one may wish to visit despite such blocking): Yet again, a good read on that note is here once more http://www.securityfocus.com/columnists/491 by Mr. Oliver Day of SECURITYFOCUS.COM ... apk
---
;Custom HOSTS files help Anonymity vs. DNS request logs:
HOSTS can help avoid DNS request logs if you hardcode in favorites into it (for 'security/anonymity' purposes)... apk
74.106.199.117 (talk) 03:54, 24 December 2011 (UTC)
thread_title:  Edit request on 24 December 2011 - Why are MY LEGITIMATE  FACTS ON HOSTS FILES BEING BLOCKED? apk 

message: Any modern antispyware or antivirus will detect malicious hosts or domains in a HOSTS file. Spybot Search and Destroy is an example thereof, & yet again, that's noted here also http://www.securityfocus.com/columnists/491 by Mr. Oliver Day of SECURITYFOCUS.COM ... apk
;The use of 0.0.0.0 circumvents the possible "threat" noted above: This is analogous to a DNS "blackhole" and does NOT loop back to the host computer loopback address of 127.0.0.1 as noted above (and the use of 0.0.0.0 also parses faster since it is smaller by 2 characters per line than 127.0.0.1 does in hosts file entries for blocking known malicious sites/servers/hosts-domains) - An even smaller & faster blocking address format is possible on Windows 2000 & XP (Server 2003 also) in using 0 as the blocking IP address (this was also possible on VISTA until 12/08/2009 MS "Patch Tuesday" but is no longer possible on versions of Windows after VISTA (7/Server 2008)).... apk
74.106.199.117 (talk) 03:55, 24 December 2011 (UTC)
thread_title:  Edit request on 24 December 2011 - Why are MY LEGITIMATE  FACTS ON HOSTS FILES BEING BLOCKED? apk 

message: I looked at this article to find the location of the "hosts" file. It has a section on that topic, with a chart listing the location for Windows 7, which I use.
However, there is no "hosts" file in the directory this article says. The closest thing is a file named "lmhosts.sam".  — Preceding unsigned comment added by 50.131.14.250 (talk) 15:12, 12 September 2012 (UTC)
thread_title:  Basic error 

message: Can someone help me. What is the host file supposed to contain? My XP seems to have two hostss files, one with just a couple of entries and the number beginning with 127, another with a few hundred names all with 0.0.0.0. This one is from 2014. Should it be kept or removed? Should it be updated? The reason I am asking is because your description of this file is not clear to someone like me, who is educated but not acustomed to computerese. 74.12.126.155 (talk) 19:37, 8 February 2016 (UTC)
thread_title: Help

message: It would be good to add that recent OS to the table. If it is not possible, that would be good to know, also.  — Preceding unsigned comment added by 96.237.100.193 (talk) 02:53, 8 February 2018 (UTC)
replies: text: I'm unsure how something that came out in 2011 is recent, but Chrome otherwise falls under the Unix category for the file location.  The rest you'll have to Google, because just editing it isn't going to help.  It probably doesn't deserve its own category, only the rootfs behavior is non-standard regarding this file and that's another article. A Shortfall Of Gravitas (talk) 11:08, 5 August 2018 (UTC)
thread_title:  Location of file on ChromeOS 

message: I normally don't feel the need to visit a talk page for an article that appears to just need a few references, but wow is all I can say to any of it.    
In any case, the first documented use of hosts for anti-advertisement purposes that I can find dates (very unsurprisingly) to the defunct fravia.org / searchlores.org's anti-advertisement section where it was published in June, 1999, and had existed somewhat longer on the messageboards before being posted to the main site.  The MVPS list is supposed to have been around since 1998 (according to itself, at least) which pre-dates that article but I'm unable to find any references / links to it from before ~2002ish. 
Also added some info from a malwarebytes blog about something that replaces a dns lib and forces an alternate hosts file to be loaded so the original appears unaffected, which is kinda a bass-ackwards way to go about it if you're already modifying the DNS libs but whatever.
I'm honestly amazed people are still using this method given the other options, but that's neither here nor there.  A Shortfall Of Gravitas (talk) 10:59, 5 August 2018 (UTC)
thread_title:  Added Cites