Fix the Ubuntu name lookup error

"Name or service not known" - the glibc resolver message for a lookup that was authoritatively answered with "not found" (EAI_NONAME)

Affects: Ubuntu (desktop and server, all releases with the glibc resolver)

What this message means

This is the negative-answer variant of a failed lookup. A guide dedicated to the error defines it plainly: "The error "Name or service not known" means a DNS lookup failed - the system tried to resolve a hostname to an IP address and could not." [1]. The distinction to the timeout variant matters: Red Hat's resolver maintainers describe the underlying code as "an authoritative response saying that the result was not found" [2] - a server answered, and the answer was "this name does not exist".

For a Smart DNS user this error usually means one of three things: the hostname was typed wrong, the name really does not exist, or the resolver you configured answered negatively for it. The fixes below separate those cases quickly.

Fix it step by step

Cause 1: The hostname itself is misspelled or does not exist

The most common cause overall: a typo in a command, a wrong subdomain, or a domain that expired. The negative answer is genuine.

Fix:

  1. Check the spelling of the hostname in the command or URL where the error appeared.
  2. Look the name up from another device or network; if it fails everywhere, the name or its DNS records are the problem, not your machine.
  3. If the lookup works elsewhere but not on your Ubuntu machine, continue with Cause 2.

Cause 2: Your Smart DNS resolver answers negatively for the name

Smart DNS resolvers answer differently depending on whether your IP is registered and which hostnames they route. An unregistered IP or a service that does not cover a hostname can produce an authoritative "not found" instead of silence.

Fix:

  1. Open your provider's dashboard and confirm your current IP is registered or validated.
  2. Check the provider's coverage list for the hostname that fails - not every service routes every streaming site.
  3. If your provider does not cover the hostname, switch the resolver back to Automatic for that test: open Settings > Network > (gear) > IPv4 > DNS and switch Automatic back on, then retest.

Step 6 of How to change DNS on Ubuntu shows where the addresses live.

Cause 3: The resolver configuration or search domains are broken

Search domains on the connection can make single-label or internal names resolve against the wrong suffix, and a broken resolver configuration can return negative answers for names that would exist elsewhere.

Fix:

  1. Run resolvectl status and check the DNS servers and search domains on your interface.
  2. Test the failing name against a known resolver directly: dig example.com @1.1.1.1. If the direct query finds it but the system-wide lookup does not, the configuration is the problem.
  3. Re-apply the connection profile: switch the DNS setting to Automatic, reconnect, and re-enter your provider's addresses cleanly on both the IPv4 and IPv6 tabs if you need them.

If nothing helps

Compare the two resolver messages directly: if the same lookup sometimes returns "Temporary failure in name resolution" and sometimes this message, the resolver is flaky or overloaded and the provider's addresses deserve a second look. Set the connection's DNS back to Automatic as a baseline, confirm normal browsing, and only then re-enter the Smart DNS addresses on both tabs, reconnecting after each change as the setup guide describes. If negative answers persist with automatic DNS too, the name itself or your search-domain configuration is the remaining suspect rather than your choice of resolver.

FAQ

How is this different from "Temporary failure in name resolution"?

"Name or service not known" means a server answered and the name does not exist; "Temporary failure" means no usable answer at all. The negative answer is authoritative, so retrying the same lookup produces the same message until something changes.

Can a Smart DNS change cause this message?

Yes, in one specific way: if the provider's resolver answers authoritatively for a streaming hostname with "not found" (for example while your IP is not registered), applications report this exact message. Re-register your IP and retest.

Does this affect only one site or all sites?

A single site points at that site's DNS record or at a hostname typo. Every site failing points at the resolver configuration or the search domains on your connection.

Setting up DNS on this device?

Open the setup guide → All Ubuntu guides

Sources

  1. OneUptime - How to Fix 'Name or Service Not Known' Errors on Ubuntu - accessed 2026-11-23
  2. Red Hat Bugzilla #1044628 - getaddrinfo return EAI_NONAME instead of EAI_AGAIN - accessed 2026-11-23