We can use the host files to block particular hostnames which we don’t want to use in system.
Hosts file: this is a file from which we can set IP address for a particular domain in our local system. We can overrule the Authoritive DNS from this file.
You can access the hosts file with below...