I was running
certbot --apache to setup the SSL certificate for Apache server and I got the following error message.
Failed authorization procedure. pscdoc.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from https://pscdoc.com/.well-known/acme-challenge/2-E0YjvS1234569EDFSFEF[126.96.36.199]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n <title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"
For certbot, you need a DNS A record to point to your IP address. Therefore, I created a DNS A record set for my domain name to point to the IP address of my website. To test out whether the DNS A record set is working or not, I wait for 30 minutes for the changes to be effective. Then, open my website using my domain name(e.g. http://pscdoc.com). The domain name does resolve. Finally, I re-run
certbot --apache and the SSL certificate was created successfully.