I have an instance where I have configured nginx. I am using Letsencrypt certificate. I configured everything when my server's IP was 123.123.123.123. The domain name I got was abc.dfg.hij Now I restarted my EC2 instance so the public IP got changed. Now when I search on the old domain name it still points to old IP and it obviously fails. I need to update this within my server. I tried to renew the certificate by running
sudo certbot --nginx -d abc.dfg.hij
But it is also trying to connect to the old IP (123.123.123.123). And that is failing by giving the following error
The server could not connect to the client to verify the domain :: 123.123.123.123
How do I update the IP address of the domain that I got.? Does anyone have any idea on this?