Useful for servers behind residential internet, where port 80 is blocked, after the deprecation of TLS-SNI-01 challenge.
certbot -d mydomain.com --manual --preferred-challenges dns certonly
After you run this command, you need to add the domain control validation (DCV) DNS entry.