Error named cURL error 6 couldn’t resolve host WordPress mostly occurs when the DNS server has a problem. By using simple server management skills, this error can be handled by the support engineers. To overcome this issue, we need to repair the DNS server properly by following certain steps mentioned below:
- First, you need to login to the SSH terminal by using the login credentials and go to the option ‘Edit’. And then, type ‘/etc/resolv.conf’ to start solving the problem ‘cURL 6 could not resolve host’.
- After that, you have to add the public name servers in Google and comment about the other servers’ names. You will get a lot of options to do this successfully and this is one of the most important steps to solve this problem. We can add name servers in the following ways.
- Then you need to restart the Nginx or Apache web server using the command “service apache2 restart” so that the error can be fixed permanently. Sometimes, you may come across a situation where the error resolving data can be erased because of the restart or reboot. So, by using the command line “sudo apt-get install resolvconf” in the resolv.conf file, the name servers can be saved.
- When you are done with the above step, add all the name servers on the resolv.conf file as a base so that the error cURL could not resolve host can be removed easily from WordPress.
Use the command “vi /etc/resolvconf/resolv.conf.d/base” to open the file and add the name servers nameserver 220.127.116.11 and nameserver 18.104.22.168 on the file. This step will help you to save the file as per the requirement.
These are the basic steps which you should follow if you come across server related errors like ‘cURL 6 could not resolve host’ appear in the WordPress.