Hosts file exists on all the operating systems and carries DNS entries for some domain names. When your web browser tries to open a website such as bing.com, it first checks this hosts file and if a corresponding IP address (such as 184.108.40.206) is found then it makes an connection to that IP address. The use of hosts file can be for blocking or redirecting certain domain names. It can also be used to make opening of websites faster as the system does not have to check external DNS servers for the domain name to IP address translation.
Just like other operating systems, on Android too we can configure hosts file using an app called Hosts Go. This app does not require your Android device to be rooted which means that it is going to work virtually on all the Android phones. In addition, it also allows the user to change the DNS servers to any of their choice.
After installing Hosts Go, you can enable the toggle button for Hosts change or DNS change to use the custom hosts file and to enable custom DNS servers respectively. You have to tap on the Start button for it start working. This will start a VPN connection which is the small trick used to applying a custom HOSTS file and DNS servers without requiring any root access. Whenever you want to disable HOSTS or custom DNS servers, you can tap on the Stop button which stops the VPN connection.
If you tap on the “DNS Editor” button, it will take you to the DNS servers entry screen where you can enter primary and secondary DNS servers. For example, if you want to setup OpenDNS for your Android device then you can set primary server to be 220.127.116.11 and the secondary DNS server to 18.104.22.168. It also comes with a list of public DNS servers ready to use such as Google Public DNS, OpenDNS, Cloudflare DNS etc.
When you enable use of custom hosts file on your Android device, it creates a blank hosts file. You can manually add one entry at a time or you can download pre-built hosts file readily available from the internet. You can also reload, import and export HOSTS file entries.
“Hosts Go” works beautifully on any Android device without requiring root access. We tried it on an smartphone running Android 10 and it quickly enabled the hosts file. We didn’t even have to restart the Android phone in order for the hosts file to start working.
You can download Hosts Go app for Android from Google Play store at https://play.google.com/store/apps/details?id=dns.hosts.server.change.