DNS problem: SERVFAIL looking up A for

Hi! I am having problems setting up ssl encryption for my website. I’ve followed this tutorial and I am failing at step four on:

sudo certbot --nginx -d -d

With the following error:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1):
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for
http-01 challenge for
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. (http-01): urn:acme:error:dns :: DNS problem: SERVFAIL looking up A for

 - The following errors were reported by the server:

   Type:   None
   Detail: DNS problem: SERVFAIL looking up A for

I’ve also got the same error, but about CAA record for some reason.

I have two A records for and www.personality kg, which correctly point to the droplet’s IP adress. I’ve checked this using:

dig +short

Here is my nginx config file located in sites-enabled directory, I’ve removed the default one:

server {
listen 81;
real_ip_header X-Forwarded-For;

root /var/www/html/psycho-test-rest/psycho_front/dist;

location /download_report/ {
root /var/www/html/psycho-test-rest/psycho_front/user-results;
try_files $uri /resultsdownload.html;

location ~ ^/(tests|CRUD)/ {
include uwsgi_params;
uwsgi_pass unix:/var/www/html/psycho-test-rest/socket.sock;
uwsgi_modifier2 30;

error_page 405 =200 /index.html;
location = /405.html {
root /usr/share/nginx/html;

error_page 501 502 503 504 /50x.html;
location = /51x.html {
root /usr/share/nginx/html;

Is there a way to fix this?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

It turns out I just had to wait for couple of hours. Not all DNS records updated.