By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
BlogoteBlogoteBlogote
  • Software
  • Tech News
  • Business
  • Fashion
  • Finance
  • Health
  • Lifestyle
Search
  • Contact
  • Blog
  • Complaint
  • Advertise
Reading: Guide to Hosts File For Mac OS X Lion Users
Share
Sign In
Notification Show More
Font ResizerAa
BlogoteBlogote
Font ResizerAa
  • Tech News
  • Gadget
  • Technology
  • Mobile
Search
  • Home
    • Home 1
    • Home 2
    • Home 3
    • Home 4
    • Home 5
  • Categories
    • Tech News
    • Gadget
    • Technology
    • Mobile
  • Bookmarks
  • More Foxiz
    • Sitemap
Have an existing account? Sign In
Follow US
  • Contact
  • Blog
  • Complaint
  • Advertise
Home » Blog » Guide to Hosts File For Mac OS X Lion Users
How to

Guide to Hosts File For Mac OS X Lion Users

Sara Taylor
Last updated: June 6, 2022 7:49 am
Sara Taylor
Share
SHARE

This article guides you through the hosts file, its uses, and how to edit hosts file either manually or with the help of free apps on your Mac computer.

Contents
  • What is a Hosts File?
  • Benefits of Hosts File
  • Hosts File Location On Mac OS X Lion
  • Edit Hosts File on Mac Computer

What is a Hosts File?

Hosts file is a plain-text file residing on your Mac system. Consider hosts file as an address book which is under the control of admin and can be used to map host names to IP addresses.

For example, if you want to redirect Google.com to Yahoo.com on your local machine, use hosts file. If you want to block a website or exclude advertisement on the Internet, use hosts file.

And if you want to exclude a particular Internet application from executing on your browser, use hosts file. You get the point — you can configure hosts file to redirect, resolve IP, block and exclude content.

Benefits of Hosts File

Configuring your Mac’s hosts file can be helpful in many ways such as:

  • You can block the IP calls on any port without having to buy blocking software for your Mac.
  • Hosts file can resolve IP addresses which can cut the time required to find a website.
  • If a website is found suspicious, you can exclude it from the hosts file.
  • As a parent, you can use hosts file to block Facebook, iTunes, or anything that you think is inappropriate for your kid.
  • You can use hosts file to disable ads on the Internet.

 

Hosts File Location On Mac OS X Lion

Mac OS X Lion users can access the host file by navigating to /etc/hosts. You can manually edit the host file by opening the file in TextEdit. If the file is locked, you can always use Terminal to edit hosts file.

This is how the default host file on Mac OS X 10.7 Lion looks like:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1    localhost
255.255.255.255    broadcasthost
::1             localhost
fe80::1%lo0    localhost

You can add entries to the host file. For example, if you want to block Facebook, Twitter and Apple server from your local machine, then you’ve to add these lines to the original hosts file:

127.0.0.1 www.facebook.com
127.0.0.1 www.twitter.com
127.0.0.1 gs.apple.com

So, whenever any one of these website is accessed from your Mac’s browser, the host file is checked and appropriate action is taken — all the three sites are blocked, in this case.

Related: Several ways to block websites on Mac.

Edit Hosts File on Mac Computer

Like Windows users, Mac users can block sites and do a lot more by editing hosts file either manually or with the help of free apps.

Whether you are using MacBook Pro, MacBook Air, or an iMac, editing hosts file follows the same procedure. And if you are in a rush, or you are not familiar with Terminal and commands, then it’s always recommended to use apps to edit the hosts file.

For those who want to manually edit hosts file through Terminal, fire up Terminal and type sudo nano /etc/hosts and the rest of the process should be fairly easy to follow.

Learn more on how to edit hosts file manually.

Gas Mask is a nifty little tool that hands you the control over the hosts file of your Mac. Gas Mask flaunts a Mac-friendly interface where you can easily edit hosts file.

You can also add remote hosts file which will be updated automatically as you edit and update the hosts file. With Gas Mask, you no longer have to worry about typing wrong commands in the Terminal. You can create and switch between multiple hosts file and use shortcuts for editing hosts file.

Download Gas Mask (Works on Mac OS X 10.7 Lion and Snow Leopard).

Another solution to modify hosts file is to download Hosts Widget, which is a dashboard widget. The widget lets you create entries, disable older entries, and automatically flushes DNS cache right from your Mac’s Dashboard.

Another Mac-friendly hosts file editor is Host Manager. Once you have the admin password locked in, adding and removing entries is a piece of cake with this app.

Uninstall Little Snitch Completely From Mac
Google’s funny weird surprising domain names
10 Best Fake ID Websites Complete Reviews 2023
Recovering Unsaved Word Documents
How to Calculate How Many Days of Your Paid Leave You Have Left?

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
[mc4wp_form]
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Share
Previous Article Uninstall Little Snitch Completely From Mac
Next Article SpringFlash: Free iPhone 4 Cydia App For Jailbroken iPhone4

Stay Connected

248.1KLike
69.1KFollow
134KPin
54.3KFollow

							banner							
							banner
Create an Amazing Newspaper
Discover thousands of options, easy to customize layouts, one-click to import demo and much more.
Learn More

Latest News

What Date is 72 Days From Today?
Guides
What is 18 Weeks From Today?
Weeks
Brazil Tech News
Brazil Tech News: Top 10 Startups Changing Latin America
News
The Best AI Video Generator for YouTube: Turning Scripts into Viral Content Fast
Guides

You Might also Like

How to Stop Emails From eBay

Sara Taylor
Sara Taylor
2 Min Read

How To Configure Android Phone and Use It as a Wireless Modem

Sara Taylor
Sara Taylor
5 Min Read

Control Preview From Opening Multiple Windows

James Betterson
James Betterson
3 Min Read
//

We influence 20 million users and is the number one business and technology news network on the planet

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

[mc4wp_form id=”1616″]

BlogoteBlogote
Follow US
Join Us!
Subscribe to our newsletter and never miss our latest news, podcasts etc..
[mc4wp_form]
Zero spam, Unsubscribe at any time.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?