Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to set custom DNS settings for a single wifi connection without affecting other connections?

I use my laptop at home and work. When at work I need to type in an IP address of a local DNS server to resolve company resources. I currently do this by pressing the "Advanced..." button on the network preferences page. Unfortunately this setting is global for all of my wifi connections. So when I go home I need to remove the DNS setting.

Can I set the DNS setting to only work while I'm connected to the company's wifi?

share|improve this question
up vote 3 down vote accepted

What you want to do is Add a Network Location for work.

You can then easily switch between them using the Location submenu of the  menu.

If you really wanted, you could set up a script to switch locations based on network, but really, how lazy do you want to be? ;)

share|improve this answer
I'm lazy! Launchbar speeds DNS changes by location :-) How can I quickly change DNS servers? – bmike Sep 15 '11 at 1:28

You can use Control Plane to switch context automatically depending on nearby WiFi networks, location, … or tons of other conditions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.