I'm running an Ubuntu 18.04 Desktop workstation on a network that hosts a Windows domain. The Windows domain servers provide DNS resolution for local servers, but don't always provide accurate DNS resolution for remote servers. This means that, if I make a non-domain DNS server as my primary (such as Google's, I can resolve web servers but not local servers. If I put the domain controller as my primary DNS server, I can resolve local servers, but not some web servers (notably AWS Cloudfront endpoints).

Example with Google DNS as primary and domain controller as secondary:

nslookup localserver

** server can't find localserver: NXDOMAIN

Is there a way to get DNS resolution to check with the secondary DNS server in the event that the primary DNS server is unable to resolve a DNS name?


1 Answer 1


You can see your current configured DNS server list in


If it does not contain all the DNS server you need, try adding more, each separated by comma in the network settings under IPV4 tab, IPV4 DNS setup

If that doesn't work, you can setup fallback DNS directly in /etc/systemd/resolved.conf

Here's a sample:

#  This file is part of systemd.
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
# See resolved.conf(5) for details

  • Thank-you for your reply. I edited the DNS servers in network settings, and that changed what's in /run/systemd/resolve/resolv.conf, but the problem persists. Un-commenting and filling in the lines in /etc/systemd/resolved.conf don't seem to have had any effect. Is there a way to verify that the latter file is being read?
    – DaneM
    Jun 5, 2018 at 19:45
  • Try looking at /run/systemd/resolve/resolv.conf I just learned that you now can use this command: systemd-resolve --status Jun 5, 2018 at 21:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .