Hosts file



I hope there will be some interesting input on this.
Myself I just used what Spybot S&D added till about a year or so ago.

For example:
How many here use the hosts file ? (Other than to “no function” one Windows come with)

In the post below I wrote a short guide for combining more than one hosts file .
One of the tools ckdupe will fail if you try a hosts file with too many lines. Of course this would be larger than you would generally use.

I did come across one hosts file site that I downloaded their tool from that if you combined all the “hosts” files they have available the file would be ridiculously large. Even some of the files by themselves are way oversized. You will need the tool for easier combining but I didn’t use any of the hosts files from this site. (For English click the US flag in the upper right).

There are several sites that do hosts files & keep them updated . So I will post only the ones I used in the guide below . Almost any of them could be combined this way . The reason for the guide is it removes duplicate entries in the hosts file which can confuse & slow down your browser.

'20 million users tricked into installing fake and malcious ad blockers'

Go to
Download or copy the "Blocking Hosts File ONLY (Windows) "
Copy part of it . From “# END OF HEADER HOSTS” up .
Into a hosts01.txt file & save.
Then edit it removing the # from the from of all entries
Leave the # if you want to be able to access the site or remove the entry entirely.
I like to add the local hosts area after the rest is done so I delete everything above the “block facebook” .

You will need the ckdupe program later.

Next go to :
Copy the hosts file from there Save As : hosts02.txt
Save the “localhosts” section to it’s own local.txt .
I add this back after the rest is done.

Next go to:
You will need to download the Housts program & it is French.
Use this program to combine (concatenate) the hosts files.

Last will be the sites Spybot S&D adds to the hosts file.
I normally keep this feature off to prevent duplicate entries.
This will be hosts03.txt

You need HostsMan to add the back to the hosts file entries.
(Get the .zip download it’s portable & doesn’t need installation).

With the above “hosts” files it is now time to combine them with Houst.
This requires some extension changing because Houst only uses the ones it was created for.
This works on any “hosts” file I’ve tried not just the ones on the site.
There is a list in the houst folder “Houst.txt” but it is in French.(I used Google translate to translate mine.Then made a EHousts.txt)
The file names to use are :
Copy the hosts01.txt , hosts02.txt , & hosts03.txt into the housts folder.
Change the names to: Hosts.blc , Hosts.rsk , & Hosts.trc respectively.
Run as administrator Houst.exe .
You will get a command type GUI . You will see o/n as the options . o is for oui which is yes.
Type o . for each then v .
You will now have a HOSTS file of the combined hosts files in the houst folder.
I change it to the lower case hosts .
Just to note for some reason this reverses the order of the hosts file to decending .
This will be changed back to ascending by ckdupe .

Copy & paste the Houst hosts file into ckdupe.
Open an admistrator command prompt .
cd\ it to the location of your ckdupe folder .
I put the ckdupe folder where I wanted it but you can follow the instructions in the ckdupe “Readme.txt” if you like.
You need the Readme.txt open anyway.
You will find & need to use this command : ckdupe -p hosts > 1
Enter that.
You may get a similar message to this :
"hosts has lines that are too long.
The offending line number is 26196
Contact the author to alter program. Exiting…"
This means the compiler of one of the hosts was a bit sloppy.
Open the hosts file in a Notepad.
Using the toolbar Edit/Go to/ Enter the line number in the error .
Select the "Go to " button.
In the hosts file I’m using it is just a comment line.
I just went to the left of the “#” hit enter & saved.
Then ran the ckdupe -p hosts > 1 again. No error this time.
You will now have a “1” file in the ckdupe folder .
This will now be the hosts file you use for the next part.
This is something I didn’t like about ckdupe . It remove all the “local” address numbers .
Those are for me or if you use those for your hosts instead.
This is the reason you need Hosts File Editor . To add those back in.

You now need to go to your Windows hosts file location.
On my windows 7 it is located here:
Change the name to hostsold. You may need to also change it from Read only.
Now copy & paste the “1” from ckdupe into a “Work” folder ( Just create a folder).
Rename it to hosts.txt .

Unzip HostMan
Run as administrator hm.exe
Edit/Preferences There are changes you want to make.
General: "Enable Hosts on exit"
System: "Automatically flush DNS cache after:
restore backup"
“Display warning when disabling an entry
Open hosts file when launching editor”

Select “Editor” lower left of GUI.
Select “Add” the Green plus sign.
Open the hosts.txt in the Work folder.
Select All & copy.
Paste this is the “Hostsnames” window.
I use make sure this or is in the IP window depending on the one you want to use.
Select the Add button. It takes a while to finish so wait.
Then File/Save to Work folder name hosts.

Open this hosts file with Notepad.
Add the local.txt file you saved above to it.
To the top of the hosts file list.
Mine is modified & here is the example:

#localhost localhost localhost.localdomain broadcasthost
::1 localhost local
#fe80::1%lo0 localhost



Just a note: [B]if you use IPv6 remove the # from #fe80::1%lo0 localhost[/B]

I just want these where i can easily access & modify if I want or need to.
In your Windows hosts file location.
For Windows 7: C:\Windows\System32\drivers\etc
Sometimes HostMan will add a HOSTS file here .
Delete it. ( as long as you have the hosts one in your “Work” folder).

The hosts file in your “Work” folder should be larger than the hosts.txt file because of the added addresses.
Copy & paste that one into the Windows hosts file location.
Open right click on it . Select Properties & set to “Read-only” & Apply.

You now have a custom hosts file.


To create the Spybot S&D " hosts file :
Name the hosts file you have “hostsold”.
That’s the one you have in the Windows location for your OS.
Create a new Text Document & name it hosts in the above location.
Then let Spybot S&D “Immunize” .
That should enter the Spybot S&D entries to the hosts file.
You then copy & paste that hosts file in a folder . Such as the “Work” one above .
This is the hosts file I named “hosts03.txt” .
After that you need to uncheck all entries in “Immunize” .
You can delete this hosts file from the Windows location.
You will be using the new one you create.
You can do this again if at some time you want to make sure you have any sites Spybot S&D has added.
You would need to follow the guide above again.
It doesn’t take that long after you get used to using it.


This is now my hosts file. I would have posted it as a .zip file but it is too large.

[Post too long for Discourse - Moved to attached Zip file]

Cholla hosts (148.3 KB)


Not sure your hosts zip size mine is 69.9kb in size only? This is for 6-11-2015
from . I am going to attach the zip file of it…along with a regedit that might be needed as well you might not needed it but I am including it. For the flushDNS see

post #6 for the download.

Still using the same hosts edit - I check it weekly and update as needed…


I keep DNS Client disabled in Services .
When I want to do a flushdns I temporarily set it to manual & start the service.
Then I do the ipconfig /flushdns.

I use the same hosts file website you do as my primary source I just add to it.
The ckdupe finds & removes duplicate entries .

We have discussed this but I still think the pound sign in front of these entries results in them being completely ignored. IMO they shouldn’t be so I do the opposite. I don’t know for sure which is correct . You seem to have no problems with it set your way & I don’t have any with it set the opposite (except for the IPv6 address).
# localhost
# localhost.localdomain
# broadcasthost
#::1 localhost
# local
#fe80::1%lo0 localhost

I think we both agree that using the hosts file sure makes adds not plague us when web surfing.

I gave zipping my hosts file a try & it is small enough to post in the forum. It’s no different than the one I posted in the code tags.
It is 149KB zipped .


This is some information on the localhost .
It is why I think the # ,Hash tag or pound sign whichever is your preference to call it should not be in front of the localhost in the hosts file . Specifically the text in bold.

The information I read was from a article at this site :

This is part of it : – What Are its Uses and Why is it Important? is the loopback Internet protocol (IP) address also referred to as the “localhost.” The address is used to establish an IP connection to the same machine or computer being used by the end-user. The same convention is defined for computer’s that support IPv6 addressing using the connotation of ::1. Establishing a connection using the address is the most common practice; however, using any IP address in the range of 127...* will function in the same or similar manner. The loopback construct gives a computer or device capable of networking the capability to validate or establish the IP stack on the machine.

How Does the Internet Protocol Work?
The Internet Protocol (IP) is a set of rules that ensure there is a standardized method to address and communicate between computers and other network devices. Besides governing the method of addressing, the IP protocol also standardizes the manner or method that data packets are sent to, delivered, and where applicable acknowledged across the Internet and local networks. Internet Protocol version 4 (or IPv4) is the fourth revision of the protocol and is There’s no place like most widely deployed throughout the world. IETF RFC 791, which was finalized in September of 1981, is the current definition of the protocol. IPv4 is slowly being replaced by IPv6, but it’s adoption is still in infancy. IPv4 is considered to be a connectionless protocol designed to be used on Ethernet-based networks. The protocol does not guarantee delivery, data integrity, or proper data sequencing; instead, relying on the Transmission Control Protocol (TCP) to handle these concerns.

How Does Work?
Establishing a network connection to the loopback address is accomplished in the same manner as establishing one with any remote computer or device on the network. The primary difference is that the connection avoids using the local network interface hardware. System administrators and application developers commonly use to test applications. When establishing an IPv4 connection with will normally be assigned subnet mask [B]If any public switch, router, or gateway receives a packet addressed to the loopback IP address, it is required to drop the packet without logging the information. As a result, if a data packet is delivered outside of the localhost, by design it will not accidently arrive at a computer which will try to answer it. This aspect of the loopback helps ensure network security is maintained, since most computers will answer packets addressed to their respective loopback address which may also unexpectedly activate other services on a machine by responding to a stray data packet.[/B]

What is the Domain Name System?
Human beings are not able to easily remember IP addresses or number well. Plain language web addresses; however, are much easier to use, but require a method to resolve to the actual address of the remote computer or server. As a result, the Domain Name System (DNS), was developed to help direct local and Internet traffic to the appropriate destination by performing real-time look-ups of Internet address with other DNS servers located on the Internet. Before a local computer will send a DNS request to the DNS server for the local network; however, it will perform a check of the locally stored Hosts file first to save time and network resources. The hosts file contains pairings of IP addresses along with one or more host names and is updated frequently based on predefined conditions on the local computer. Before the invention of DNS, there was a single Hosts file that was shared across the network. This was found to not pass the test of scalability; however, when multiple networks started to get connected together which resulted in the development of the DNS system in use today.

How is Used in the Hosts File?
Whenever a computer user tries to access a website or remote computer by name, the computer checks the locally stored Hosts file for domain name resolution before sending a request to the Domain Name Server (DNS). The IP address is commonly found in the Hosts file on computers assigned to the plain English address, “localhost.” It is also used by computer malware to assign legitimate websites to the localhost to prevent the end-user from seeking legitimate computer security assistance with malware infection. This type of change has most commonly been associated with many of the computer scareware packages that have been deployed across the Internet through maliciously infected websites, Trojan horse viruses, and infected email attachments. Some computer administrators, and interested students, can modify the hosts file to prevent access to undesirable websites; however, is not the preferred method as the end-user (or administrator) now becomes responsible for removing the entry when required. Examples of host file entries: localhost

What is a Special Use IP Address?
A special use IP address is one that has been assigned by the Internet Assigned Numbers Authority (IANA) and is reserved for a specific reason or purpose. The IANA’s authority to delineate these addresses comes from the IETF to make assignments in support of the Internet Standards Process. The IANA defines special use IP addresses for IPv4 in RFC 3330: Special-Use IPv4 Addresses and for IPV6 in RFC 3513: Internet Protocol Version 6 (IPv6) . RFC 3330 was the first specification to collect the various one-off definitions for special use IP addresses such as that had been defined over the years in a central location. Based on these lessons learned, all of the special user IPv6 addresses were included in RFC 3513 from the beginning. The IANA does state in RFC 3330 that the Internet does not protect against the abuse of special IP addresses such as The organization also goes on to recommend that if all data packets from a reserved address are assumed to have originated from the same computer’s subnet that all border routers should filter reserved packets that do not originate from the same device since there have been instances of attacks mounted based on the use of one or more of these special addresses.

Special IP Address Summary Table
Address Block Present Use “This” Network Private-Use Networks Public-Data Networks Cable Television Networks Reserved, subject to allocation Loopback Reserved, subject to allocation Link Local Private-Use Networks Reserved, subject to allocation Reserved but subject to allocation Test-Net 6to4 Relay Anycast Private-Use Networks Network Interconnect Device Benchmark Testing Reserved, subject to allocation Multicast, commonly used in multiplayer simulations and gaming and for video distribution. Reserved for Future Use

What Are the Common Uses for
A common technique to verify that a computer’s networking equipment, operating system, and TCP/IP implementation are working correctly is to send a ping request to Based on the results of the test, administrators or computer users can troubleshoot network connectivity issues. Application developers also make use of the loopback address to test basic network functionality when developing a program or application component prior to going “live” on a network or the Internet with testing or deployment.

Some of the “lighter” uses of the loopback address are to trick computer security or computer science students into attempting to crack, probe, or test network speed by using the address. There are also a number of variations on the “World’s Worst Hacker” found across the Internet. In these stories (which at least a few are likely based on true stories), fellow hackers urge “newbies” or a “less-than-knowledgeable” hacker to infect, hack, or conduct a DOS or DDOS attack against the address. In the more humorous stories, the hacker succeeds in infecting or deleting information from his or her own computer to the amusement of those watching.

Where is Defined?
RFC 1700, published by the Internet Engineering Task Force (IETF) was the first document to reserve the address block for loopback purposes. IETF document, RFC 3330, then further described the usage of the IPv4 address block for loopback purposes. These definitions were later updated exclusively through the IANA and continue to be excluded for assignment by Regional Internet Registries or the IANA.

What is IPv6?
As the number of people and devices that use the Internet has grown, the demand for addresses has continued to grow exponentially. Internet Protocol Version 6, IPv6, is the next generation protocol that is designed to ultimately replace IPv4 and is slowly being adopted in education and research circles. The Internet Engineering Task Force (IETF) developed IPv6 to accommodate the increasing number of devices and users accessing the Internet and to help address some of the fundamental security shortcomings in the IPv4 implementation. IPv6 accommodates a greater number of addresses by using bigger numbers to create IP addresses. Under the IPv4 addressing convention, an address is 32 bits in length that allows for approximately 4.3 billion unique addresses. IPv6; however, uses a 128 bit address that permits up to 340 trillion, trillion IP addresses.

What Are the Advantages of IPv6?
Besides the significant increase in total numbers of IP addresses, IPv6 also offers networking advantages over IPv4. The new protocol allows devices to detect and use services of IPv6 enabled networks without requiring action by the end-user. It also significantly reduces the need for Network Address Translation (NAT) which is used on IPv4 to allow a number of clients to share a single IP address. A number of research projects based on the underlying IPv6 technology are underway as part of the Internet 2 project led by a non-profit U.S. networking consortium comprised of education communities, industry, and government. With more than 280 members, the Internet 2 Network currently connects more than 60,000 institutions and provides a next-generation optical network that can meet high-performance demand requirements for research and education.

What is the Equivalent of in IPv6?
::1 or in longhand, 0:0:0:0:0:0:0:1 is the loopback address in the IPv6 protocol. The loopback address in IPv6 performs a similar function as in IPv4 by allowing a node to send a data packet to itself. It cannot be assigned to any physical interface on the computer and is considered to have a “link-local” scope. The ::1 address is not allowed to be used as a source address in IPv6 packets that are sent outside of a single node. If they are, an IPv6 router is not allowed to forward the data packet. If a packet with this address is received on an interface, it must also be dropped. The loopback, “unspecified addresses,” and the IPv6 addresses that have embedded IPv4 addresses are assigned out of the 0000 0000 binary prefix space.


In the case of the PC hosts file it seems to look better and better considering adblock is now taking money to pass ads through their very program to yours truly the endusers. This is the reason I distruct those software companies they are more interested in the money aspect of it more then the endusers enjoying the internet free of ads, popups and fake links to malware.


My latest hosts update for 7-14-15…

hosts (72.6 KB)


Hi coolcolors , Is this the one from with the original MS hosts on the top & the # added to these:
# localhost
# localhost.localdomain
# broadcasthost
#::1 localhost
# local
#fe80::1%lo0 localhost

I just wanted to verify this.
If you have some other modification please post it.

I haven’t combined another hosts file yet my last one was 6/13/2015 .
It still seems to be working well. Almost too well sometimes .
It gives Google ads a kick in most cases.
I may gather the various ones again which include the one at soon & create a new one.

When I do I will post it.
All you would want to do is add the # to the files above since you believe that is best for your OS .
As you know I use the opposite on all but the IPv6 address.
As the # makes the OS ignore those settings.
But I’m all for what works & if the # works best for your OS use it.


[QUOTE=cholla;2757035]Hi coolcolors , Is this the one from with the original MS hosts on the top & the # added to these:
# localhost
# localhost.localdomain
# broadcasthost
#::1 localhost
# local
#fe80::1%lo0 localhost

I just wanted to verify this.
If you have some other modification please post it.

That’s the only change that I made which is different from what they have listed on their site.

Below is their original as it looks…before I made the change…

#<localhost> localhost localhost.localdomain broadcasthost
::1 localhost local
#fe80::1%lo0 localhost


This is the hosts file I combine from the hosts sites with some additions of my own. It’s through so there may be some sites in it you will want to add the # to or delete them.
For example:


My new hosts for September 14, 2015. The top half if it was the Original PC hosts file, I just merge the two together.

hosts (73.3 KB)


The one from 3 weeks ago was a new one I had put together from the ones I use .
I believe it is still good & I probably won’t do another one for a while .
In the one I did for those that wish to use it.
You may want to remove these settings. They are my attempt to use the hosts file to direct my connection to the DNS servers it is supposed to use. I’m not sure it does this as there is no documentation that it does . For me it hasn’t hurt anything because if it works it directs the DNS where I want it & if it doesn’t it just an unused setting.
They are :

You might want to leave the google one if you use it & even add the other google one.

I’m working at adding the hosts file from here to my hosts file for possibly blocking MS telementry & data collection . I consider this [B]Experimental[/B] & don’t recommend it at this time . It also has the address . I have changed this to the in my hosts addition . For my OS I think this works better.
I also deleted all entries for WindowsUpdate from it . The reason is it broke Windows Update until I removed them. Removing all of them may not have been necessary & I will be adding them back in & testing .

[B] MS is supposed to have hard coded the dnsapi.dll so the hosts is bypassed for telemetry & data collection. [/B]
If that is correct then this work I’m doing for this with the hosts file won’t stop this.
It is possible it will even slow the OS down while the hardcoded bypass is done.

I just added the link for those that want to see it & I’m not recommending adding it at this time. So do so at your own risk.

[B] The one in the .zip file I posted should be safe except for the DNS change I recommend. It may also be too thorough & you may have to delete or # sites it blocks if you want to visit them.[/B]


I know I only update but not much changes other then the hosts updates is all. I do have another part to that before the actual hosts and this is the hosts edit I found myself search and looking online that I found and made those edits myself. So I have both the Windows hosts original and the PC hosts edit and between those two are my “Personal hosts Edits” that block sights I go that tries to open up sites that the PC hosts edit doesn’t always catch. I have the standard PC hosts edit and my extreme PC hosts edit that has all the other plus my own personal edits that are added into it.


New latest hosts that also has telemetry blocker sites listed on there…

hosts (73.3 KB)


updated for 9-19-15

hosts (73.4 KB)


Update for 9-21-15

hosts (73.5 KB)


Update for 9-30-15

hosts (73.5 KB)


Hosts 10-9-15

hosts (74.1 KB)