Account

Error guide / Subdomain not resolving

How to fix a subdomain that does not resolve

A subdomain is not resolving when a DNS lookup for that exact name, such as blog.example.com, comes back empty: the browser gets no IP address and never reaches your server. A subdomain is a separate hostname with its own DNS record, so a working example.com says nothing about it. Chrome then shows DNS_PROBE_FINISHED_NXDOMAIN, Firefox says "server not found", and curl reports "Could not resolve host". People also use the phrase loosely when the name does resolve but the wrong site, a blank hosting placeholder or a certificate warning comes up, which is a different problem on the server side. The check on this page tells the two apart in one step, because it looks up A, AAAA and CNAME for the exact hostname you type in.

Check your site

>

What causes it

The most common cause is that no record exists for that exact name, or that it was added in the wrong zone, for example at the registrar or at an old provider whose nameservers no longer answer for the domain. Next comes timing: a record you just created or changed is still cached elsewhere with its old value, and part of the internet keeps seeing nothing until the previous TTL expires. If the record does exist, the cause is on the server. No site is configured for that hostname, so you get a default page, someone else's site or a 404. Several panels create the DNS entry without creating the virtual host, so correct DNS proves nothing about the site. Less common but easy to miss are a CNAME at the same name as other records (this is invalid, and answers become unpredictable), a stale specific record that overrides a wildcard *.example.com, and a certificate issued only for example.com and www, which produces a security warning instead of a lookup failure.

How to fix it

  1. Run the check on this page for the full hostname, blog.example.com and not example.com. If A, AAAA and CNAME all come back empty, the record does not exist or has not propagated yet, and the fix is in DNS (steps 2 to 4). If any of them returns a value, DNS is fine and the fix is on the server (steps 5 and 6).
  2. Add or correct the record in the zone your nameservers actually serve. Compare the NS records the check returns with the provider whose DNS panel you are editing: a record added to an abandoned zone is never read. Point A (and AAAA if you use IPv6) at the server IP, or use a CNAME to the target hostname. If the domain is on Cloudflare, the record must exist in the Cloudflare dashboard, and it is normal for a proxied record to return Cloudflare addresses instead of your server IP.
  3. Do not mix a CNAME with other records: a CNAME must be the only record at its name, so no A, MX or TXT may sit next to it. If you rely on a wildcard *.example.com, delete any stale specific record for that subdomain, because a specific record always wins over the wildcard. Many providers also apply wildcards only one level deep.
  4. Wait out the TTL before drawing conclusions. After editing DNS, re-run the check in 5 to 30 minutes, test over mobile data as well, and clear your own cache with ipconfig /flushdns (Windows), dscacheutil -flushcache (macOS) or chrome://net-internals/#dns. A change of the domain's nameservers takes noticeably longer than a change to one record.
  5. If the check returns a record, open the subdomain and look at what the server actually sends back. A default hosting page, another site or a 404 means no virtual host answers for that name. Add the subdomain in your hosting control panel, or add the hostname to the vhost ServerName/server_name and reload the web server, then confirm that its document root points at the right folder.
  6. If the browser shows a certificate warning instead, the certificate does not cover this name. Reissue it with the subdomain included or use a wildcard certificate. Where SSL is issued automatically, request it only after the DNS record resolves, because validation needs the name to be live.

Related errors