Workshop

Taking Back Control: CAA Records

Published on: 2025-05-17

By: Ian McCutcheon

Taking Back Control: CAA Records, CNAMEs, and the ALIAS Record Trick

Many of us rely on third-party platforms – CDNs, PaaS providers, SaaS applications – to host parts of our online presence. A common way to point our custom domain names to these services is using a CNAME record. For instance, you might point app.esoup.net to a service hosted at cool-app.google.example.net or cdn.esoup.net to endpoint.cf.example.net. Simple, right?

But when it comes to securing these endpoints with TLS/SSL certificates, things get a bit more interesting, especially regarding CAA (Certification Authority Authorization) records. CAA records are your way of telling the world which Certificate Authorities (CAs) are allowed to issue certificates for your domain, acting as a vital safeguard against mis-issuance.

So, here's the question: When you use a CNAME like app.esoup.net pointing to cool-app.google.example.net, who actually controls the CAA policy – and thus which CAs can issue certs – for your app.esoup.net hostname? The answer might surprise you, and understanding it is key to maintaining the level of control you desire.

How CAA Record Checks Work with CNAMEs (The Standard)

The behavior of CAA lookups in the presence of CNAMEs is defined by RFC 8659. The rule is straightforward: when a CA (or a resolver checking on its behalf) looks for a CAA record for a specific hostname (like app.esoup.net) and instead finds a CNAME record pointing elsewhere (cool-app.google.example.net), the CAA lookup process stops for the original name and restarts using the target name of the CNAME record.

;; Standard CNAME setup
app.esoup.net.   300 IN CNAME cool-app.google.example.net.

In this scenario, a CA trying to issue a certificate for app.esoup.net would follow the CNAME and check for CAA records associated with cool-app.google.example.net. The CAA records published for the apex esoup.net domain (or any specifically for app.esoup.net if they existed, which they usually don't in this CNAME setup) are ignored for this specific check.

Effectively, the CNAME delegates the authority for CAA policy for app.esoup.net to the owner of cool-app.google.example.net.

Why Providers Often Rely On This:

This delegation is often intentional and beneficial for service providers. They can publish CAA records on their target domain (cool-app.google.example.net) permitting their preferred CAs (e.g., Let's Encrypt, Google Trust Services, DigiCert). This allows them to automatically provision and renew TLS certificates for your custom domain (app.esoup.net) seamlessly in the background. It's frictionless for you, the end-user, because you don't need to take any action regarding CAA records or certificate management for that specific service.

Why You Might Want Control Back

While convenient, this implicit delegation might not align with everyone's requirements:

If you want to ensure that the CAA check for app.esoup.net respects the policies set within your own esoup.net zone, the standard CNAME method prevents this.

The ALIAS/ANAME Record "Trick"

Enter the ALIAS record (sometimes called ANAME or similar, depending on the DNS provider). This is a non-standard, proprietary record type offered by many modern authoritative DNS providers. It's designed to overcome the limitation that you can't place a CNAME at the zone apex (e.g., for esoup.net itself), but it has a useful side effect for our CAA scenario.

Unlike a CNAME, which returns the target hostname to the resolver, an ALIAS record works differently:

Here's how you might configure it (syntax varies by provider):

;; Example ALIAS setup (syntax is illustrative)
app.esoup.net.   300 IN ALIAS cool-app.google.example.net.
cdn.esoup.net.   300 IN ALIAS endpoint.cf.example.net.
email.esoup.net. 300 IN ALIAS region.azure.example.net.

The Key Difference for CAA: Because the resolver querying for app.esoup.net receives an A/AAAA record answer, not a CNAME, the CAA lookup rule about restarting at the target is not triggered. The CAA check proceeds normally up the DNS tree starting from app.esoup.net, looking for CAA records at app.esoup.net itself, then esoup.net, and finally the TLD/root if nothing is found lower down.

Result: Using an ALIAS record instead of a CNAME keeps the CAA policy check firmly within the authority of your esoup.net zone.

(Aside: Why use a dedicated DNS provider for this? While major cloud platforms like Google Cloud, Azure, or Cloudflare often offer their own DNS services, you might choose a specialized authoritative DNS provider for features like advanced ALIAS record handling, superior performance, different geographical distribution, specific GSLB capabilities, or simply to maintain separation of concerns and avoid vendor lock-in. It's a valid choice to select the best-of-breed provider for each part of your infrastructure, including DNS.)

Consequences and Considerations: The Trade-offs

Regaining control sounds great, but this approach comes with significant consequences you must understand and manage:

Necessary Actions (If Using ALIAS to Point to Third Parties):

If you use the ALIAS trick, you must ensure the provider's required CA is permitted by your effective CAA policy for that hostname. You have a few options:

  1. Modify Apex CAA (Simplest, Broadest): Add the necessary provider CA(s) to the CAA record at the apex (esoup.net). dns ;; Potentially too broad esoup.net. IN CAA 0 issue "ca-you-trust.com" esoup.net. IN CAA 0 issue "provider-ca-for-google.com" ;; Allows for entire domain esoup.net. IN CAA 0 issue "provider-ca-for-cf.com" ;; Allows for entire domain

    • Drawback: This might allow these provider CAs for your entire domain, potentially conflicting with your goal of tighter control.
  2. Add Specific Hostname CAA (More Granular, Preferred): Create specific CAA records for each hostname using an ALIAS record, authorizing only the CA needed for that specific service. This is generally the best approach. ```dns ;; Specific CAA records in esoup.net zone esoup.net. IN CAA 0 issue "ca-you-trust.com" ;; Base policy for non-wildcards

    app.esoup.net. IN CAA 0 issue "provider-ca-for-google.com" ;; Only for app. (non-wildcard) cdn.esoup.net. IN CAA 0 issue "provider-ca-for-cf.com" ;; Only for cdn. (non-wildcard) email.esoup.net. IN CAA 0 issue "provider-ca-for-azure.com" ;; Only for email.* (non-wildcard)

    ;; To explicitly block wildcard certificates (like .app.esoup.net) at this level, ;; overriding any permissive 'issuewild' records inherited from esoup.net, add: ;; (Note: The presence of an 'issue' tag alone does NOT block wildcards) app.esoup.net. IN CAA 0 issuewild ";" ``` * Benefit:* Keeps permissions localized. Requires knowing which CA(s) each provider uses (check their documentation).

  3. Manage Certificates Manually (Most Control, Most Work): If the provider platform allows you to upload your own custom certificate, you could potentially:

    • Keep your apex esoup.net CAA policy strict.
    • Use an ACME client (like Certbot) with DNS validation against your authoritative provider to obtain a certificate for app.esoup.net from a CA permitted by your policy.
    • Upload this certificate and its private key to the provider's platform.
    • Drawback: This adds significant operational overhead for managing issuance, renewal, and uploading. Only feasible if the provider supports custom cert uploads.

Other Considerations:

Conclusion: Informed Choices

The standard CNAME record provides convenience and enables frictionless certificate management by implicitly delegating CAA authority to the service provider. While often desirable, this might not meet everyone's control requirements.

Using a non-standard ALIAS record offers a way to regain that control, ensuring CAA checks remain within your domain's authority. However, this "trick" comes at the cost of potentially breaking the provider's automated certificate issuance processes. If you choose the ALIAS path, you must be prepared to take deliberate action – either by carefully crafting specific CAA records for each ALIASed hostname or by taking on manual certificate management.

Understanding this interplay between CNAMEs, ALIAS records, and CAA lookups empowers you to make an informed decision. Weigh the benefits of explicit control against the operational requirements, consider your security policies and your provider's capabilities, and choose the approach that best suits your needs for each specific service integrated with your domain.