After installing WordPress on my EC2 instance and successfully deploying a site, I purchased a domain from a hosting provider. The hosting provider assigned me an IPV4 address with HTTPS enabled. However, since the IPV4 address of my EC2 instance was different, I had to modify the DNS settings by changing the A record to match my EC2 instance's IPV4 address. The site is now up and running smoothly. However, when I attempt to use Certbot Apache in my instance to secure the connection, I encounter an error.
My domain is: www.ikirityganga.com
I ran this command: sudo certbot --apache
It produced this output:
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Detail: 2a02:4780:b:874:0:1a6e:e02b:2: Invalid response from http://ikirityganga.com/.well-known/acme-challenge/iVAA3qdysz3_BAKMb-mRYo6PUQJYuEwkZ6BP2Bi9fVI: 404
Detail: 2a02:4780:b:874:0:1a6e:e02b:2: Invalid response from http://www.ikirityganga.com/.well-known/acme-challenge/ufuizdB6v-r3EJ6c9rCkOLbDMP2h1_OZ__b9v0K-Ols: 404
Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
My web server is (include version):
The operating system my web server runs on is (include version): Ubuntu 22.04.2 LTS
My hosting provider, if applicable, is: Hostinger
I can login to a root shell on my machine (yes or no, or I don't know): yes (EC2 instance)
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
The version of my client is (e.g. output of
certbot --version or
certbot-auto --version if you're using Certbot): certbot 1.21.0