Why You Should NOT Modify Your HOSTS File

Eric TateBlog

Why You Should Not Modify Your HOSTS File

 

Why You Should Not Modify Your HOSTS File

Network issues can be a tricky thing to solve. What may seem like the simplest of problems could actually be rather complex behind the scenes. Since its in our nature to take matters into our own hands, those curious to try and solve the issue themselves may turn to Google to try to locate a solution. But it’s important to know that not everything on the internet is accurate!  Why You Should Not Modify Your HOSTS File.

One such example of a simple issue with a possibly complex solution is when a website won’t load properly, or at all, within your browser. If you were to Google the problem, you may come across some sites that include various troubleshooting steps. One of those steps may be instructions to update something called a HOSTS file on your local computer. A website not loading is not the only problem that may suggest a change to your HOSTS file. But regardless of what the problem is that brought on the suggestion, we’re here to tell you one thing…. DON’T DO IT!

At this point, you may be asking yourself “What is this HOSTS file you keep mentioning?” To help describe that, let’s take a step back and look at how access to websites work.

As mentioned in my recent blog post regarding how to protect your domain name, every device connected to the internet has a unique identifier called an IP address. Depending on the use case, an IP address might be private to your local business (called a Local Area Network) or a public IP address that is visible from the outside world (called a Wide Area Network). A domain name is used as an easy to remember identifier that internet services then translate into a unique IP address, in order to provide you with access to the intended destination. This translation of data uses a protocol called Domain Name System (DNS). Much like how a phone book could be used to translate a person or business into a phone number, DNS helps look up an internet IP address by the domain name.

Now, let’s get back to the topic at hand. A HOSTS file is a component of operating systems that can also translate a domain name into an IP address. The difference though, is that this file lives within your computer only and does not receive updates dynamically when the providers of websites publish changes to their DNS records. Records published in your local HOSTS file supersede what it would find from querying DNS – so putting an entry into HOSTS will prevent you from receiving future changes automatically. It also allows you to only translate a domain name to a single IP address. This can be a problem for larger websites that use multiple IP addresses for a single domain name in DNS to provide high availability. In that example, any change or disruption to the IP address placed into your HOSTS file will result in you no longer being able to access the site.

On top of access issues like the ones mentioned above, modifying your HOSTS file can become a security vulnerability on your computer. If you were to follow steps that told you to modify the file, one of those steps would be to modify the security settings of the file itself, because it is locked down by default in most operating systems to prevent changes. This is intentional! One of the reasons for that is that it is one of the first targets that malware will look for when infecting your computer. If your computer gets infected with a virus and your HOSTS file is able to be edited, it can and most likely will write entries to it that can make your typical web browsing redirect to things that are much more nefarious.

So with all of this scary talk about your HOSTS file, it’s easy to question why it is even there and whether there is any situation where it is acceptable to modify it. There are a few rare situations where a HOSTS file may need to get changed. Even in those situations, it is important to let a trained I.T. professional, such as our team here at Diligex, manage the changes for you so that it can be done properly and reverted when the need is completed. One such example is the field of web development. The developers may update their HOSTS file or ask clients to do so in order to temporarily test revisions of a domain name’s website without needing to publish those changes to the production server. Changes to both the file and its security should be temporary and properly contained.

If you are ever asked by anyone to modify your HOSTS file, especially someone who you do not personally know, always consult with your I.T. team to verify whether the need is merited. If you are a Diligex Managed IT subscriber, our help desk team will be happy to assist you with assessing the situation. If you are not currently a Diligex Managed IT subscriber, feel free to contact us at https://diligex.com/contact/ to learn how Diligex can help your business thrive.

HOSTS files can be useful under the right circumstances but harmful under the wrong ones. Letting Diligex be your trusted I.T. partner can help keep your company’s network safe from such harm!