Get a VPS server with a 15% discount
Sale ends in
00Days
:
00Hours
:
00Minutes
:
00Seconds

DNS error “Temporary failure resolving…”: how to fix it

This article covers what to do if you encounter issues with your DNS servers.

The error looks roughly as follows:

Temporary failure resolving error

We will demonstrate two ways to resolve this issue: via SSH access and via sFTP access.

Using SSH

Use the Nano editor to view and edit the resolv.conf file, which is used to configure the server DNS. Run the following command:

The resolv.conf file editor will open in front of you.

resolv.conf file editor

The file may be empty, or it may contain some descriptive text. This depends on the selected Linux distribution.

In this file, you need to specify a nameserver for your OS.

Which nameserver should you use? You can find more details at the end of this article. In this example, we will use DNS 8.8.8.8 from Google as the primary resolver.

Add the following lines to the file:

↙ Click a line to copy it
Adding nameserver entries to resolv.conf

Press Ctrl + X to exit the file, then press Y to save the changes.

Saving changes in Nano

Then press Enter to keep the file name unchanged.

Confirming the resolv.conf file name

Using sFTP

Connect to your server via sFTP. Then navigate to the /etc directory and locate the resolv.conf file there.

resolv.conf file in the /etc directory

Open it with any text editor.

Opening resolv.conf in a text editor

The file may be empty, or it may contain some descriptive text. This depends on the selected Linux distribution.

Here, you need to add appropriate nameserver entries. It is recommended to specify several of them in case one becomes unavailable.

↙ Click a line to copy it
Adding nameserver entries through sFTP

Great, save the file and upload it back to the server.