Large Hosts FIles

PowerShell

Its hard to find much technical information on the Windows Hosts file, beyond what is pretty much common knowledge.  Some questions I had recently that were hard to find the answers to:

Q.  How big can the hosts file be?
A.  I still haven’t found an answer to this one, but apparently pretty darn big.  The MVPs.org Hosts file is over 600Kb and still growing (it is designed to block certain malware related sites).

Q.  How long can a single line in a hosts file be?
A.  It seems the answer to this question is 256 bytes!

Q.  Can I list an ip address more than once in the hosts file and will that cause any problems?
A.  You can list the same ip address as many times as you like in the hosts file without any problems.  In fact, I’d recommend this technique over long lists in the same line for readability purposes too.

Leave a Reply

Your email address will not be published. Required fields are marked *