Issue with certbot certificate renewal and "Unable to connect to server" when accessing one domain

Hi, there. I hope the holidays go well!

I have just recently signed up for a VPS (I believe it is called) (the smallest one) at Digital Ocean to host two simple websites of mine ( and This was my first time interacting with Linux on a server and Apache, and after installing the LAMP image on Ubuntu 20.04 on my droplet, I was able to follow along the excellent resources provided herein and set up virtual hosts for my two domains, obtain SSL certificates for the two domains using Let’s Encrypt, and install WordPress for one of my websites ( (the other one,, is simple hardcoded HTML/CSS). I am facing two main issues presently, wherein any assistance would be greatly appreciated (have gone through the three tutorials from here that I used and elsewhere, but I haven’t been able to figure where I am going wrong):

  • Although I was able to secure a certificate each for each for each of my sites with sudo certbot --apache -d -d and sudo certbot --apache -d -d respectively, I am unable to run sudo cerbot renew --dry-run without an error. The http-01 challenges fail for,,, and, and the error type is either “dns” or “unauthorized” depending on the attemmpt. This seems to suggest that there is something up with my DNS records, but these I have adjusted approximately two days prior using the Digital Ocean interface and name servers, so I’m not sure if the issue lay there it should still persist. I was also thinking that if the issue lay there I shouldn’t have been ale to obtain the certificates in the first place nor access my domains in the browser.

  • The above might be closely linked with my second issue, in that although my first website ( seems to be working well, my second website ( which uses Wordpress is only working a slight portion of the time, and I mostly get the message “Unable to connect to server” in Firefox and Edge. After some refreshes in Edge, the website sometimes begins to magically work for a minute or two on both Firefox and Edge, before becoming nonoperational again as I am in the process of WordPress edits. I was thinking that if this was a DNS issue, I should be getting a message that DNS look up failed perhaps, and that the site should either be working or it should not. Accordingly, I was thinking the issue might lay in my apache configuration files for virtual host though I have been unable to find anything wrong with them despite my best efforts nor does sudo apache2ctl configtest give anything except: apache2: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this message. I have accordingly, uploaded the contents of my .conf files at the following Pastebin link:

For reference, my droplet is “1 GB Memory / 25 GB Disk / BLR1 - LAMP on Ubuntu 20.04”. Your assistance is greatly appreciated, and my apologies for the long post.

Kind Regards, Abdullah

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.

Hi there @AlTalib,

It looks like that the domain has too many nameservers:

DNS problem

I would recommend deleting the extra nameservers and using only the DigitalOcean nameservers or the nameservers of your other DNS provider in order not to get any DNS conflicts.

Let me know how it goes! Regards, Bobby