How can I stop my router 'hard coding' my DNS?

Hi all, I have an odd network issue which I’ve not been able to figure out, and thought maybe someone here could help. It’s been going on for several months, or maybe a year. What happens is that when I connect to my home WiFi (provided by my internet router), the DNS for my MacBook Air gets explicitly set to the router’s address. What I mean by this, is it’s as if I have clicked the + in the DNS pane and typed it in – the address appears in black, and if I change networks it remains. Normally when the router provides DNS, the server addresses are listed in grey and don’t remain when I connect to a different network.

For ages, I thought my computer just had problems with certain WiFi networks, so I’m not sure exactly when this started (to tie it to some change I made). It turns out that basically my laptop worked whenever the WiFi I was connecting to happened to use the same IP address for DNS as my home network.

Strangely, when I am on my home WiFi, the DNS address is set on all interfaces – when I plug in to ethernet at work, I have the same issue that my internet doesn’t work because it’s still trying to use my home network’s DNS address. I have to go into the network settings, remove the home network DNS address by selecting it and clicking -, and then everything works fine. But the next time I connect to my home WiFi, my DNS gets explicitly set again.

This is obviously not the end of the world, as I can manually go in and remove the DNS address when I use my laptop away from home. But it’s irritating, and I can’t figure out why it’s happening. As far as I can see, there’s nothing in my router’s settings that are causing this, and my wife doesn’t have the issue with her MacBook Air (and my iPhone also doesn’t have this issue). Is there anything I can check on my MBA to find out why it hard codes the DNS address every time I connect to my home network?

Many thanks for any ideas!


I would suggest deleting the plist files that hold wifi settings on your machine… or setting the DNS on your router to something like OpenDNS, Google or Cloudflare so that DNS will work no matter where you are.

Hmm. Maybe even simpler: go into Network Preferences, advanced and ‘forget’ your wifi network. Then add it back in. That sounds to me like it would redo the preferences for it.



1 Like

In the few times I have experienced inexplicable Network problems the following method to recreate the Network preference files has made the appropriate corrections.

I navigate to this folder:


[I made a correction here because I initially listed some older preference files. The following is a more current listing.]

and copy these five files to the Desktop:

Once they are copied delete them from the SystemConfiguration Folder, empty the Trash and reboot.

You will likely need to turn WiFi back on after you reboot then connect to your home Network and see if it works as intended.

If this does not correct your Network issue then you need to look at your router.

1 Like

Thanks @theconsultant and @papagordie, I’ll give these a try and report back. @theconsultant, some years ago I did consider setting my DNS to one of these providers, but decided that I don’t really want all my DNS queries going through a single provider, and definitely not Google!