This file contains references to websites and IP addresses, and you can use it in many different ways on your Mac.Its a really great way to block certain websites from being accessed on your machine.The second possible usage is to test out your own websites locally on your machine.
You can have the hosts file redirect your chosen domain name to the network path of your local storage. Thats to prevent users from modifying it without proper knowledge and causing damage to the entire system. You can use it to open and edit any text file including the hosts file on your machine. The second section where it has the host name is what you use to access that IP address. ![]() You can have a domain name point to something completely different than what its supposed to point to. Here, type the domain name that is to be redirected to the IP address you typed earlier. You now need to flush the DNS cache to bring the changes into effect. To do it, type the following command into the Terminal and press Enter. If you dont already know it, you can use a command in the Terminal to find out the IP address of any website. Make sure to replace wikipedia.org with the website of your choice. You can add an entry to the file and all the connection requests to that entry will be denied. Bring your cursor where the localhost entry ends and press Enter to add a new line. Type in the IP address 127.0.0.1 and press Tab on your keyboard. For example, if you want to block Instagram, type instagram.com. Type the following command and press Enter to flush the DNS cache. Have you used the hosts file on your Mac before If so, what was it for Let us know in the comments below. Over the last few years, hes written a number of tech articles on various online publications including but not limited to MakeTechEasier and Android AppStorm. I graduated from Emory University with a degree in Computer Science and Mathematics.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |