Managing ports on VPS and dedicated servers: how to check open ports, configure your firewall correctly, avoid common mistakes, and improve infrastructure secur...
3v-Hosting Blog
13 min read
ERR_NAME_NOT_RESOLVED is one of the most annoying browser errors because it looks like the site is dead, when in fact the server may be alive and kicking. You launch a project, transfer a domain to a new VPS, roll out Ingress in Kubernetes, connect a CDN, or simply want to access the admin panel, when suddenly, instead of the page, you get a response saying that the domain name is not defined.
This error is almost always about DNS, and DNS is a tricky thing because its architecture is distributed, it is cacheable, and the domain name system depends on a bunch of intermediate nodes. Therefore, one user may be able to open the site, while another user may not be able to open it, and a third user may receive an ERR_NAME_NOT_RESOLVED error from their browser.
In this article, we will try to figure out what exactly causes this error, how to quickly understand where the problem lies, with you or in the domain zone, how to diagnose NXDOMAIN/SERVFAIL, and what to do in different scenarios - from simply clearing the cache to checking your domain delegation.
In order to understand what we are talking about, we first need to understand what DNS is and how this service works.
DNS (Domain Name System) is a service that translates human-readable domain names into IP addresses that are understandable to the network. A browser cannot go to a domain on its own; it always connects to a specific IP address. Therefore, when you enter example.comin the browser's address bar, a DNS query is first made - that is, a search for the answer to the question of which IP address corresponds to this domain name. Usually, this answer is taken from the cache (browser/operating system/provider) or requested from a recursive DNS server, which, if necessary, forwards the request to the domain's authoritative DNS servers and receives A/AAAA/CNAME records. In simple terms, the resolution chain can be represented by the following steps:
example.comin your browser;And if the IP cannot be obtained at any of these stages, the browser displays ERR_NAME_NOT_RESOLVED, i.e., your browser simply does not know which server to contact.
In practical terms, the problem almost always boils down to one of three options:
Now that we have identified the root cause of the problem, let's take a closer look at the main reasons.
Below, we will divide the causes into two groups and explain why this division will be useful to us.
The main mistake in any diagnosis is chaotic behavior, such as immediately trying to access the domain control panel, even though the problem is local, or, conversely, trying to clear the cache when the domain is not delegated, or perhaps does not even exist. That is why we must divide the possible problems into the following groups.
The most obvious signs that the problem is on the user's side may be:
Typical causes in such cases may be as follows:
/etc/hosts file;This group almost always manifests itself as follows:
dig command returns NXDOMAIN, SERVFAIL, or an empty ANSWER;
Typical reasons in this case may be as follows:
Now that we have figured out the possible causes of the error, we can self-check and quickly find out whose side the problem is on, instead of rushing around trying everything and bothering your provider's support for no reason.
| Symptom | What it usually means | What to do first |
|---|---|---|
| Works for everyone except you | Local DNS issue, cache, VPN, or hosts file | Try from mobile internet, change DNS to 1.1.1.1 / 8.8.8.8 |
| Doesn’t work for anyone | DNS zone or delegation problem | Run dig example.com and dig NS example.com |
| Works by IP but not by domain | Missing or incorrect A record | Check A/CNAME record in DNS panel |
example.com works but www does not |
Missing record for www |
Add A/CNAME record for www |
| After changing records it works intermittently | DNS propagation / caching in progress | Check TTL and wait for caches to expire |
| Doesn’t work in office but works at home | Corporate DNS or filtering | Check resolvers, split DNS, conditional forwarding |
This table will help you quickly decide which direction to dig, which will ultimately save you a lot of time.
Now it's time to move on to practice. Essentially, to locate the problem, you need to answer just three questions:
Let's look at a couple of commands and figure out what exactly to look for in the response.
dig command - checks whether the IP is returned and whether there is an A/AAAA recordThe syntax of this command is extremely simple:
dig example.com
What to look for:
status: NOERROR- means that the domain exists, the response is correct, but the A record may be empty if not specified;status: NXDOMAIN- the domain does not exist in DNS at all, it is either not delegated, or there is a name or zone error;status: SERVFAIL - the server was unable to process the request. This often means that there are problems with authoritative NS, DNSSEC, or unavailability.ANSWER SECTION: are there any A/AAAA records?If the ANSWER section is empty, this is the reason why the IP cannot be found.
dig NS - checking delegationAgain, no surprises in the syntax:
dig NS example.com
The response should contain NS servers. If there are no NS servers or they are clearly not the ones you expect, the problem may be with the delegation at the registrar of this domain.
The logic is simple:
If you know that the domain's NS is ns1.example.net, you can query it directly:
dig @ns1.example.net example.com A
If the public dig example.com gives strange results, and a direct query to the NS shows different information, this most likely means that somewhere along the way the information was either cached or there is an extra resolver along the way.
dig +trace - where exactly did it breakType in the command line:
dig +trace example.com
This command shows the chain from the root to the authoritative NS. This is the best way to see where exactly the problem occurs, for example, the delegation does not match, the NS does not respond, or the zone does not return a record.
One of the most nerve-wracking moments when working with DNS is when, after changing records, the site starts to behave differently. One user sees the new version, another sees the old one, and a third sees an error altogether. From the outside, it looks like chaos or server instability, although most often the cause is simply DNS request caching.
It is important for us to understand that DNS is not updated instantly around the world. It is a distributed system, and changes made to domain data are propagated gradually from one server to the next in the hierarchy, and from there down to others.
There is also a parameter called TTL (Time To Live), which is the lifetime of a DNS record in the cache. Essentially, this is an instruction to the resolver on how many seconds a particular query can be stored without being rechecked.
If the record has a TTL of 3600, this means that the resolver has the right to store the received IP address for one hour and not request it again from the authoritative server. Until the TTL expires, the resolver will continue to return the old response, even if you have already changed the record.
So why does this unstable performance occur? It's simple.
The problem is that caching does not occur in one place. The caching chain includes recursive DNS servers of providers, corporate DNS within companies, etc., right down to the browser's own cache. Each of them can store the old response until the TTL expires, and as a result, some users already receive the new IP, while others still see the old one. And if a mistake was made when changing the record, some resolvers may even temporarily cache a negative response (for example, NXDOMAIN).
From the outside, this looks like website instability, but in fact, it is the normal operation of the caching mechanism, which we have just begun to understand.
If you are planning to migrate your site or change your IP, you should not change the record at the last minute. It is much more correct and safer to reduce the TTL (for example, to 300 seconds) in advance, 24-48 hours in advance. Then the cache will be updated faster, and the switch will be smoother and more predictable.
After the migration is complete, the TTL can be returned to a higher value to reduce the load on the DNS servers.
Now let's get down to specifics - what to do if the error has already occurred. Remember that in this case, it is important not to act chaotically, but based on what we have already learned: first, understand where the problem is, and then fix it at the appropriate level.
As we have already determined, all situations can be divided into two groups: a local problem (for a specific user) and a problem on the domain or DNS zone side. The approach in these cases will be different.
A local problem means that the domain as a whole exists and is accessible to most users, but problems arise on a specific computer or in a specific network. This is the most common scenario after recent DNS changes. What to do in this case?
Clearing the DNS cache
The operating system and browser may store old DNS responses. Even if the record has already been updated on the server, the local resolver may continue to use the old IP. Clearing the cache on Windows:
ipconfig /flushdns
On Linux (systemd-resolved):
sudo resolvectl flush-caches sudo systemctl restart systemd-resolved
If you are using nscd:
sudo systemctl restart nscd
After clearing the cache, the system will stop using the outdated IP and request fresh data from the DNS server.
The hosts file takes precedence over DNS, so if it contains an entry for your domain, the system will not refer to external DNS servers at all.
On Linux/macOS, the file is located at:
/etc/hosts
On Windows:
C:\Windows\System32\drivers\etc\hosts
Look for lines with your domain and check what is written there. Pay special attention if your domain is next to either an old IP address, the local 127.0.0.1, or even 0.0.0.0.Correct this entry to the valid IP address and restart the system.
Sometimes the problem is not with the domain, but with the provider's DNS server. It may cache outdated data or be temporarily unstable.
To check, you can temporarily specify other public DNS servers in your computer's network settings. The most popular public DNS servers are Cloudflare servers - 1.1.1.1 and 1.0.0.1, as well as Google servers - 8.8.8.8 and 8.8.4.4.
This does not mean that public DNS servers are better in any way. In some cases, when such a public server goes down, problems are observed across most of the Internet, since many people use them. No, this is just a way to check, because if everything works with the new DNS, then the problem was on your provider's side.
VPNs often replace DNS requests and use their own resolvers. This can lead to problems such as:
Disable your VPN and if the site opens without it, then the problem is in the VPN settings.
This scenario is more critical for website owners. After all, if your domain does not resolve globally, users simply cannot access the project. Here you need to check the DNS infrastructure.
The first thing to do is to make sure that the domain is active and its registration has not expired. If the registration period has expired, the domain may enter a holding or blocking stage, and resolution will be unstable or stop altogether.
The registrar's panel usually shows whether the domain is active, whether it is blocked, and whether delegation is disabled.
If the domain is delegated to the wrong NS servers, any changes in the correct DNS panel will be meaningless, because the Internet will refer to the registrar's specified location. Therefore, the next step is to check:
A very common error is when the zone is configured in one panel at one registrar, but the domain is delegated to other NS servers, for example, those that are not related to this registrar at all.
Even if the NS are specified correctly, they must actually respond to requests. Then you should perform a direct check:
dig @ns1.example.net example.com A
If the server does not respond or returns an error, then the problem is with the DNS server or the zone configuration.
The most trivial but also the most common reason is when the record is simply missing or specified incorrectly.
In your domain control panel, check:
www, if used;
And once again, we remind you that when localizing and troubleshooting the ERR_NAME_NOT_RESOLVED problem, you need to proceed in a consistent manner:
When you follow this chain, the likelihood of quickly finding and correcting the causes of the error increases.
People usually only think about DNS when something has already broken. But in practice, DNS is your gateway, even the entry point to your project. You can have a perfectly configured server, a fault-tolerant cluster, and a well-designed CI/CD, but if the domain stops resolving, users simply won't be able to access the site.
To avoid such situations, it is enough to implement just a few basic practices.
For a public domain, it is considered normal to have at least two NS servers, preferably in different networks or locations. This is not redundancy for the sake of it, but protection against a situation where one server becomes unavailable.
A common mistake is to monitor only HTTP/HTTPS. But if DNS stops working, the web server simply won't be reached. Therefore, it makes sense to also monitor:
wwwresolves;
This can be configured in Zabbix, Prometheus (via blackbox_exporter), or any external monitoring service. The main thing is to check the resolution from the outside, from the Internet, and not from your own infrastructure.
Many sudden crashes are not related to technical problems, but to organizational ones, when the domain has expired, the letter from the registrar went to spam, or the invoice payment did not go through.
The minimum set of measures to exclude these options is:
It's trivial, but it's often these little things that cause real downtime.
If you are planning to change your IP or transfer a project, do not change the record at the last minute. It is better to lower the TTL (for example, to 300 seconds) 1-2 days before the migration, so that the caches will be updated faster and the switch will go much more smoothly.
Once everything has stabilized, you can return the TTL to a higher value.
If you manage the zone yourself (for example, through BIND), it is useful to check it before restarting the DNS server:
named-checkzone example.com /etc/bind/zones/db.example.com
This way, you can catch syntax errors before they become a problem for users.
Ultimately, DNS prevention is not about building complex architecture, but about accuracy and control. When the zone is correct, the servers are reserved, the domain is renewed, and the resolution is monitored, ERR_NAME_NOT_RESOLVED becomes a rare exception rather than a regular headache.
Because DNS does not return the IP. The server is alive, but the domain does not point to it (there is no A record or it is incorrect).
No. SSL starts after receiving the IP and establishing a connection. With ERR_NAME_NOT_RESOLVED, SSL does not reach.
It depends on TTL and caches. Usually from minutes to days. 48 hours is the upper limit for poorly managed caches, but in practice it usually happens much faster.
Yes. Especially with incorrect NS at the registrar, disabled zone, DNSSEC conflict, errors in records within the CDN.
No. A firewall can cause timeouts, connection refusals, and similar issues. ERR_NAME_NOT_RESOLVED occurs earlier, when the IP address has not yet been received.
The ERR_NAME_NOT_RESOLVED error is not a server crash or a browser issue. It is a stop at the very first stage - the DNS resolution stage. The browser simply did not receive the IP address and therefore cannot start the connection.
In most cases, the reason is quite mundane, such as a missing A record, incorrectly configured delegation, an expired domain, or the cache still holding old data after migration. Less often, there are deeper problems, such as authoritative NS not responding, SERVFAIL occurring, DNSSEC conflicts, split DNS incorrectly configured in the corporate network, or errors in CoreDNS within Kubernetes.
The key to a successful and quick solution is not to guess the reasons, but to take methodical steps according to a simple algorithm. A few simple commands, such as dig with parameters, allow you to quickly understand where the failure occurred, at the cache, resolver, delegation, or zone level. Once the point of failure is found, the error ceases to be a big problem and becomes a routine infrastructure task that needs to be solved.
What is WHOIS and how to use it: domain, IP, and ASN verification, status, delegation, GDPR, differences from RDAP, and practical scenarios for administrators a...
Favicon - what it is, why you need it, and how to set it up correctly for all browsers and devices. Sizes, formats, SEO impact, and common mistakes in one guide...
Switching users in Ubuntu: su, sudo, sudo -i, sudo -u, and SSH. A practical guide to working securely with permissions, environments, and sessions on servers an...