Type the command below into the terminal to open hosts file in ‘nano’ text editor: Open Terminal from Applications -> Utilities -> Terminal.app, or by typing the first few letters in Spotlight. But do not flinch upon hearing “terminal” – it is easy since we have detailed instructions and screenshots below. To edit the hosts file in Mac OS X, you have to use the terminal to open the file (since it is a system file). Thus, the hosts file has maximum priority, and you can edit it to block certain domains (known malicious domains), or to redirect domains to local addresses (for web development and testing). Only when it does not find an entry does it resolve the IP with the help of global DNS servers. When a URL is requested, the system checks for a mapping on the hosts file first and gets the corresponding IP address. The hosts file is used to map domains to IP addresses (at a primary level, above DNS servers).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |