So I was tweaking my friend's laptop and upon showing him my custom hosts file which includes some bad URLs I don't wanna ever visit and the Microsoft Ads servers, he asked me why did I have 127.0.0.1 local host in the first line and gave me an explanation that went over my head. Is there any problem with me having the first and last line highlighted in bold? I don't remember where I saw the need to enter the addresses between those lines, I think I took that idea after seeing how the MVPS Hosts file was like
Hi, The last line in red you can remove. And after the comments (the lines starting with # ) it should start with: 127.0.0.1 localhost ::1 localhost #[IPv6] In those "custom" entries from you, I would change 127.0.0.1 into 0.0.0.0 I would advice to read again at http://winhelp2002.mvps.org/hosts.htm I use the MVPS HOSTS file. Others use other and/or more HOSTS files. If I add my own entries, I begin those lines with a line (entry) like for example: # Phoenix (explanation: entries starting with # are just only info; just like comments in entries after # ) There may be more to say about it, like for example: - why don't you use the MVPS HOSTS file? - be aware that the HOSTS file is a file without extension IMHO this thread belongs in the "Other Anti-malware Software" subforum.
Here is how the start of the HOSTS file (using the MVPS HOSTS file) should look: # This MVPS HOSTS file is a free download from: # # http://winhelp2002.mvps.org/hosts.htm # # # # Notes: The Operating System does not read the "#" symbol # # or anything after the # symbol on the same line # # # # This *must* be the first line: 127.0.0.1 localhost # # # #**********************************************************# # -------------- Updated: November-30-2017 --------------- # #**********************************************************# # # # Disclaimer: this file is free to use for personal use # # only. Furthermore it is NOT permitted to copy any of the # # contents or host on any other site without permission or # # meeting the full criteria of the below license terms. # # # # This work is licensed under the Creative Commons # # Attribution-NonCommercial-ShareAlike License. # # https://creativecommons.org/licenses/by-nc-sa/4.0/ # # # # License info for commercial purposes contact Winhelp2002 # 127.0.0.1 localhost ::1 localhost #[IPv6]
If you would want your own entries added, using the MVPS HOSTS file, the start would show like this: # This *must* be the first line: 127.0.0.1 localhost # # # #**********************************************************# # -------------- Updated: November-30-2017 --------------- # #**********************************************************# # # # Disclaimer: this file is free to use for personal use # # only. Furthermore it is NOT permitted to copy any of the # # contents or host on any other site without permission or # # meeting the full criteria of the below license terms. # # # # This work is licensed under the Creative Commons # # Attribution-NonCommercial-ShareAlike License. # # https://creativecommons.org/licenses/by-nc-sa/4.0/ # # # # License info for commercial purposes contact Winhelp2002 # 127.0.0.1 localhost ::1 localhost #[IPv6] # Phoenix 0.0.0.0 softonic.com 0.0.0.0 bestvistadownloads.com 0.0.0.0 image.online-convert.com 0.0.0.0 mp3goo.com 0.0.0.0 tracking.opencandy.com.s3.amazonaws.com 0.0.0.0 media.opencandy.com 0.0.0.0 cdn.opencandy.com 0.0.0.0 tracking.opencandy.com 0.0.0.0 api.opencandy.com 0.0.0.0 offer.alibaba.com 0.0.0.0 t.nuvidp.com 0.0.0.0 sso.anbtr.com 0.0.0.0 seen-on-screen.thewhizmarketing.com 0.0.0.0 win-rar.com 0.0.0.0 mp3adio3.website 0.0.0.0 mp3zo.com 0.0.0.0 filehippofree.com 0.0.0.0 sofwareworld.com 0.0.0.0 win-rar.com 0.0.0.0 driversguru.com 0.0.0.0 burners.burn4free.com 0.0.0.0 instamp3.live 0.0.0.0 a.ads1.msn.com 0.0.0.0 a.ads2.msads.net 0.0.0.0 a.ads2.msn.com 0.0.0.0 ads.msn.com 0.0.0.0 ads1.msads.net 0.0.0.0 ads1.msn.com 0.0.0.0 b.ads1.msn.com 0.0.0.0 b.ads2.msads.net # [Start of entries generated by MVPS HOSTS] # # [Misc A - Z]
Thanks a lot for your detailed answer. I really appreciate your time on this. The reason I chose 127.0.0.1 is I remember back then on Windows 8, when I tried 0.0.0.0 the addresses weren't blocked but they were blocked when I used 127 so I'll give it another shot now and see if they're blocked
Yes 0.0.0.0 is much better to use for blocking purposes than 127.0.0.1 because 0.0.0.0 means NO address, while using 127.0.0.1 points to the loopback interface on your own machine and directing all those web connections to your loopback interface can cause other issues.
You're welcome! Glad I could be a little help. (I'm sure that siljaline would have helped better (RIP Randy; almost a year ago; you are missed old friend!)).