How to check DNS settings on Mac OS X 10.7 Steps. Open System Preferences, either from the Dock or the Apple menu System Preferences.; When the System Preferences window appears, click on the Network icon.
- Add Dns Entry
- How To Add Dns Entry
- Manual Dns Entry In Windows
- Manual Dns Entry Machines
- Local Dns Entry
How to Change DNS Server Settings in Mac OS X. Thank you Eduardo. I’ll try it that way. I guess I thought you could just add servers to the list and retain the originals, but evidently that isn’t the way it’s set up. Dec 05, 2015 While most internet server providers offer their own DNS servers, and most Macs will use DNS from DHCP or a wi-fi router, Mac users sometimes wish to change DNS settings themselves to custom servers, perhaps for better performance, or for troubleshooting purposes.This is easily accomplished in MacOS and Mac OS X as we’ll detail in this walkthrough. When you add a permanent entry to the local DNS cache on your PC, it will always override the information provided by the nameserver. If a nameserver gives the wrong address for a domain or provides no information at all, you can still access the domain if it’s listed in the local Hosts file. Your Mac’s hosts file is a small, but important text document that has the ability to map hostnames to specified IP addresses. Although the modern Internet uses a variety of public and private DNS servers to map IP addresses, the hosts file is a handy way to override those DNS servers, allowing you to manually point a website address to a desired IP address, or block access to a site.
If you're setting up a new web server or another device that's going to be connected to the internet and you want to put it through its paces before it's live, or if you're having trouble with spyware and adware networks, there's an invisible file on your Mac that can help. It's called the Hosts file, and this is how to use it.
Add Dns Entry
The Domain Name System
When you type in the domain name of a web site you want to visit there's a lot happening behind the scenes. Every web site, every service, almost every device connected to the Internet has a unique numeric address that tells all the other devices where it is — its TCP/IP address. The Domain Name System (DNS) translates those numeric addresses into something a bit more recognizable and memorable to humans, like, 'www.imore.com' for example.
The first time you type in a web address, your Mac pings a DNS server — typically one automatically configured for you by your Internet Service Provider — to find out the TCP/IP address of the server you're trying to connect to. Your Mac builds up a hidden cache file to remember those details later on when you visit the same site again.
![Manual dns entry mac os Manual dns entry mac os](/uploads/1/2/4/7/124713288/323594362.png)
The Hosts file
The Domain Name System and its associated cache is your Mac's standard way of knowing how to get to where it's going on the Internet, but there's another file that can be very useful. It's called the Hosts file, and it can be used to override the default DNS information.
There are some practical reasons for why you'd want to use the Hosts file instead of just letting DNS do its thing. Let's say you're testing a development server you're about to deploy, and you'd like to use its domain name instead of the machine's specific IP address. Before the system's online and accessible to anyone using DNS, you can use the Host file instead: Enter the machine's IP address and when you use that domain name, your Mac will go to that device instead.
You can also use the Hosts file to block or work around spyware and ad networks by 'zeroing out' their IP addresses - putting in 0.0.0.0 then the name of the domain you'd like to block.
How to edit the Hosts file
You'll need to know the IP address of the device you'd like to send your Mac to, or the domain names you're trying to keep your Mac away from. The best way to work with the Host file is by using the Terminal application found in your Mac's Utilities folder. You can search for Terminal using Spotlight or by selecting it in Finder.
- Open a Finder window.
- Select Applications from the sidebar.
- Double-click on Utilities.
- Double-click Terminal.
In the Terminal window, you will need to enter a command to open the Nano text editor. You will need your administrator password, as well.
- type sudo nano /etc/hosts and then hit return.
- Enter your administrator password and then hit return.
How To Add Dns Entry
You're now in the Nano text editor. You should see something that looks like this:
If you want to add a new device or domain, move the cursor using the arrow keys and position it after the text in the window. Then, begin typing.
If you're mapping a particular IP address on your local network to a domain, you can type the IP address, hit tab, then type the domain name.
Conversely, if you'd like to make sure a web URL doesn't go to its intended site — if you're trying to keep your Mac away from certain sites, use '127.0.0.1.' That'll map it back to your Mac. Even if your Mac is assigned a different IP address by its router, 127.0.0.1 defaults to the local machine thanks to the default settings in that hose file.
Once you're done, hold down the control and O keys to save the file, then control and X to exit.
One last step
Back at the command line, type sudo killall -HUP mDNSResponder then type return. That will flush your Mac's DNS cache, so it doesn't get confused by any changes you've made to the Hosts file.
Don't forget you've modified the Hosts file, because at some point you may need to undo the changes you've made in order to keep your Mac working right.
Manual Dns Entry In Windows
How to reset your Mac's Hosts file
When you're ready to undo your changes and restore where your Mac's Hosts file routes to, you can do so by replacing the current host file with a new set of terms. You don't need Terminal for this reset.
- Make sure Finder is selected on your Mac.
- Click on Go in the Mac menu bar.
- Click on Go to Folder.
- Enter /private/etc/hosts into the search field.
- Click Go.
- Drag the Hosts file from the Finder window onto your desktop.
- Open the Hosts file from your desktop. It should open to TextEdit by default.
- Delete the content of the Hosts file.
- Paste the following into the same file:
##
# 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
- Click Save.
- Drag this same Hosts file from your desktop back into the same folder. If you don't have the folder open in finder anymore, follow steps one through five to reopen it.
- Click Replace when asked whether you want to replace the file.
- Enter your Administrative password when prompted (that's the password used by the main user to unlock their Mac).
- Restart your Mac.
Manual Dns Entry Machines
Have any questions? Let me know.
You may need these Mac accessories
Samsung T5 SSD(From $85 at Amazon)
Samsung's T5 SSD has super fast transfer rates with write speeds up to 540MB/s, which is great for backing up your Mac before making system changes like editing a host file.
Belkin Thunderbolt 3 Cable($30 at Amazon)
For up to four times transfer speed, make sure you're using a Thunderbolt 3 cable. Belkin's brand supports up to 100W power delivery and measures 1.6-feet long for a little extra length
SanDisk Dual Drive(From $25 at Apple)
If you want to download files, documents, or photos to transfer to another computer SanDisk has the perfect external drive. It has a reversible USB-C and USB-A connector, too!
Updated June 2019: Updated information for changing your host file.
macOS
Main
Local Dns Entry
We may earn a commission for purchases using our links. Learn more.