WEB-162Recommended
Choose who may issue your certificates
Publish DNS CAA records. They list which certificate authorities may sign certificates for your name. All others must refuse.
How to do it
Add 0 issue "letsencrypt.org" for your authority, and one line for each other authority you use, such as your CDN's. Add 0 issuewild ";" if you need no wildcard certificates, and 0 iodef "mailto:…" for reports. To go further, tie issuing to your own ACME account with accounturi (RFC 8657).
Examples
DNS example
example.com. 3600 IN CAA 0 issue "letsencrypt.org"
example.com. 3600 IN CAA 0 issuewild ";"
example.com. 3600 IN CAA 0 iodef "mailto:security@example.com"
Shell example
dig +short CAA example.com
How to check
dig +short CAA example.com returns your records, and a certificate renewal still succeeds.
Sources
Related rules
- INF-35 Keep DNS records in code in Infrastructure and environments
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/hosting-and-network/caa-records">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.