Disable built-in DNS clients in Chromium based apps

3 months ago 2

All Chromium-based apps such a Google Chrome, Obsidian have a built-in DNS client. I have set up NextDNS on my computer to block ads and trackers. The built-in DNS clients by pass the NextDNS, which I don’t want.

On top of built-in DNS is switched on by default, there is no way to switch it off using the UI. In macOS, I found a way to switch it off using the command line.

First, you need the bundle identifier of the Chromium-based app. I have listed bundle identifiers of popular apps towards the end of the page. Otherwise, use the mdls command to get the bundle identifier.


mdls -name kMDItemCFBundleIdentifier -r <path/to/chromium-app.app>

Once you have the bundle identifier, use the defaults command to set BuiltInDnsClientEnabled to false.


defaults write <bundle-identifier> BuiltInDnsClientEnabled -boolean false

Make sure to restart the app after you run the defaults command. You can use dnsleaktest.com to check which DNS server is used by the Chromium browser.

You can revert to using the built-in DNS client by deleting the BuiltInDnsClientEnabled preference.


defaults delete <bundle-identifier> BuiltInDnsClientEnabled Application Bundle Identifier
Chromium org.chromium.Chromium
Google Chrome com.google.Chrome
Obsidian md.obsidian
Visual Studio Code com.microsoft.VSCode
Vivaldi Browser com.vivaldi.Vivaldi

More posts

Read Entire Article