sudo certbot --apache -d your_domain -d www.your_domain
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: www.domain.com
Type: None
Detail: DNS problem: NXDOMAIN looking up A for www.domain.com -
check that a DNS record exists for this domain