Plesk

External hosts are not resolved from a Plesk server: “Name or service not known” or “Could not resolve host”

Symptoms

Cause

The DNS resolver specified in the file /etc/resolv.conf cannot resolve domain names.

Resolution

  1. Connect to the Plesk server via SSH.

  2. Open the file /etc/resolv.conf in a text editor. In this example, we are using the vi editor:

    # vi /etc/resolv.conf

  3. Comment the invalid resolver out by placing a # (hash) character at the beginning of the line.

    #nameserver 203.0.113.2

  4. Add a different DNS resolver, for example Google public DNS server:

    #nameserver 203.0.113.2
    nameserver 8.8.8.8

  5. Save the change and close the file.

    Note: /etc/resolv.conf can be overwritten on Ubuntu 18.04 and higher by netplan and systemd-resolved.services.

  6. Retry the previously failed operation.

    Note: If the above solution does not help, contact your service provider in order to check the network setup.