Arama Yap Mesaj Submit
Request a Callback
+90
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro

Contact Us

Location Halkali merkez neighborhood fatih st ozgur apt no 46 , Kucukcekmece , Istanbul , 34303 , TR
Network and DNS

How to Fix DNS Resolution Errors on Ubuntu and AlmaLinux?

For DNS troubleshooting, first check whether the server can reach the outside world at the IP layer. If access to the IP works but the domain does not resolve, it is the resolver; if IP access is also unavailable, there is a route, gateway, firewall or interface problem.

Temporary FailureCould Not Resolve Hostresolv.confNetplanNetworkManager
root@linux:~#
ping: example.com: Temporary failure in name resolution
curl: (6) Could not resolve host: example.com
Network is unreachable
8actual error message
6Safe diagnostic command
3Distribution and panel flow
7Technical FAQ response
01
technical approach

Linux DNS Resolution Errors How to parse the problem?

For DNS troubleshooting, first check whether the server can reach the outside world at the IP layer. If access to the IP works but the domain does not resolve, it is the resolver; if IP access is also unavailable, there is a route, gateway, firewall or interface problem.

01

Record full error

Get the first real error message with time information in the journal, service and kernel log instead of the general warning on the screen.

02

Separate the layers

Test service, disk, network, permission, security policy and application configuration separately without changing them at the same time.

03

Verify deployment

The service name, package manager and firewall tool may be different on Ubuntu/Debian and AlmaLinux/Rocky/CloudLinux.

04

Prepare a comeback

Keep a second session, console, snapshot or current backup for SSH, network, firewall, boot and disk changes.

Do not modify the /etc/resolv.conf file without knowing the symlink structure used by the administrator service.

02
Error dictionary

Log messages, reasons and first secure transaction

8 registration
01kritik

Temporary failure in name resolution

Meaning: The resolver cannot convert the domain name to an IP.

Possible cause: DNS server, resolv.conf or network problem.

02kritik

Could not resolve host

Meaning: The application did not receive a DNS response.

Possible cause: Wrong nameserver, proxy or container DNS.

03kritik

Network is unreachable

Meaning: Hedefe rota yok.

Possible cause: Default route or interface is down.

04warning

Destination Host Unreachable

Meaning: The gateway or local network cannot reach the target.

Possible cause: Wrong subnet/gateway or link problem.

05warning

systemd-resolved failed

Meaning: The local stub resolver is not working.

Possible cause: Service or symlink is broken.

06warning

resolv.conf overwritten

Meaning: The manually written DNS was changed by DHCP or an admin tool.

Possible cause: Editing outside Netplan/NetworkManager.

07warning

SERVFAIL

Meaning: The authoritative or recursive DNS could not complete the query.

Possible cause: DNSSEC, upstream or zone issue.

08bilgi

sudo: unable to resolve host

Meaning: The local hostname does not match /etc/hosts.

Possible cause: The hostname changed but hosts was not updated.

No error records were found matching this expression.

03
Copiable controls

SSH and system diagnostic commands

Interface and route

ip -br addr
ip route
ip rule

Shows IP addresses, default route and policy routes.

IP and DNS distinction

ping -c 3 1.1.1.1
getent ahosts example.com
dig +time=2 +tries=1 example.com

Separates network access from DNS resolution.

Resolver durumu

resolvectl status 2>/dev/null || true
readlink -f /etc/resolv.conf
cat /etc/resolv.conf

Shows the systemd-resolved and resolv.conf structure.

Ubuntu Netplan

netplan get 2>/dev/null || true

Shows the persistent network and nameserver configuration.

NetworkManager

nmcli device status 2>/dev/null || true
nmcli device show 2>/dev/null | grep -E 'GENERAL.DEVICE|IP4.DNS|IP4.GATEWAY|IP4.ADDRESS'

Shows the active DNS and gateway values on the RHEL family.

DNS port test.

nc -zvu -w2 1.1.1.1 53
nc -zv -w2 1.1.1.1 53

Tests UDP and TCP port 53 access.

04
Application by environment

Ubuntu, AlmaLinux and panel server separation

Ubuntu / Debian

The Netplan, systemd-networkd or NetworkManager backend must be determined; the /etc/resolv.conf symlink structure must be preserved.

  • networkctl status 2>/dev/null || true
  • systemctl status systemd-resolved --no-pager 2>/dev/null || true
  • netplan get 2>/dev/null || true

AlmaLinux / Rocky / CloudLinux

The ipv4.dns, ignore-auto-dns and gateway settings inside the NetworkManager connection profile should be used.

  • nmcli connection show --active
  • nmcli device show
  • systemctl status NetworkManager --no-pager

Container / Panel Server

Docker, container resolver, panel DNS service and host resolver must be separated from each other.

  • docker info 2>/dev/null | grep -i dns || true
  • cat /etc/docker/daemon.json 2>/dev/null || true
  • systemctl status named bind9 pdns --no-pager 2>/dev/null || true
Security and access risk

Absolutely don't

  • Do not modify the /etc/resolv.conf file without knowing the symlink structure used by the administrator service.
  • Do not completely disable the firewall for a DNS issue.
  • Do not apply a Netplan change on a remote server without using netplan try.
  • Do not delete the default route without console access.
Post-procedure check

Verify the solution

  • IP and domain tests succeed together.
  • The DNS setting persists after reboot.
  • apt, dnf, curl and mail services can resolve domains.
  • IPv4 and, if used, IPv6 routes are consistent.
05
Internal SEO content set

Related Linux error solutions

06
Primary technical sources

Official Linux and distribution documentation

07
Frequently asked questions

Linux DNS Resolution Errors Curiosities about

What is the first step for Linux DNS resolution errors?

Record the exact on-screen or logged error message with its timestamp, then test the service, network, disk, and security layers separately.

Why are Ubuntu and AlmaLinux commands different?

The package manager, firewall, network manager, and some service names differ by distribution family. The distribution section on the page explains these differences.

Is restarting the service a solution?

A restart may restore service temporarily, but restarting before collecting logs and resource data can hide the root cause.

Can I run the commands directly in production?

Read-only diagnostic commands are generally safe. Configuration, firewall, disk, and recovery changes require console access, a backup, and a rollback plan.

Do the same steps apply to a cPanel or Plesk server?

The Linux layer is the same, but control-panel service wrappers, firewall plugins, and vendor packages must also be considered.

How can I avoid losing root access?

Keep a second session and the provider console open during SSH, firewall, network, or boot changes.

Does this guide guarantee a number-one ranking on Google?

No. Technical accuracy and coverage provide a strong foundation, but rankings also depend on competition, site authority, internal links, speed, and user behavior.

EKA SOFTWARE AND INFORMATION SYSTEMS

Let us fix your Linux server without causing access or data loss

We analyze Ubuntu, Debian, AlmaLinux, Rocky and CloudLinux service, disk, network, security, performance and boot problems with log data.

Get Technical SupportWrite via WhatsApp
Top