AWS Security ChangesHomeSearch

AWS AmazonCloudFront: CloudFront alternate domain name move options and DNS verification

Service: AmazonCloudFront · 2026-11-20 · Documentation medium

File: AmazonCloudFront/latest/DeveloperGuide/alternate-domain-names-move-options.md · Type: network

Summary

Restructures and expands the guide on moving alternate domain names (CNAMEs) between CloudFront standard distributions and distribution tenants. Adds new sections on migrating a live domain without downtime via update-domain-association, using the new OnDomainTakeover (allow/reject) parameter, and rolling a domain back. Changes the cross-account move rules so the source no longer must be disabled, and instead requires a DNS record (CNAME or TXT) that proves domain control pointing to the target; adds certificate-coverage requirements so HTTPS keeps working, TXT record naming tables for subdomain/apex/wildcard domains, and warnings that CloudFront does not track a moved domain's origin (risk of the domain ceasing to be served).

Security assessment

The diff documents domain-control validation (DNS TXT/CNAME record that proves ownership of an alternate domain name before CloudFront moves it to another distribution or distribution tenant) and adds a certificate-coverage requirement so the domain keeps serving over HTTPS after the move. These are security-relevant controls against unauthorized domain/CNAME takeover and HTTPS downgrade, but the change is documentation of feature behavior and hardening guidance rather than a fix for a specific vulnerability, CVE, or incident, so security_issue_related is false while adds_security_documentation is true.

Evidence

+A DNS record proves that you control the domain and points the domain to this distribution tenant. Usually, this is the domain's CNAME record. Use one of the following records:

Diff

diff --git a/AmazonCloudFront/latest/DeveloperGuide/alternate-domain-names-move-options.md b/AmazonCloudFront/latest/DeveloperGuide/alternate-domain-names-move-options.md
index 3b0b334..5154bd5 100644
--- a//AmazonCloudFront/latest/DeveloperGuide/alternate-domain-names-move-options.md
+++ b//AmazonCloudFront/latest/DeveloperGuide/alternate-domain-names-move-options.md
@@ -7 +7 @@
-Use a wildcard to move an alternate domain nameContact AWS Support to move an alternate domain name
+Migrate a live domain without downtimeMove domains when you create or update a distribution tenantUse a wildcard to move an alternate domain nameContact AWS Support to move an alternate domain name
@@ -9 +9 @@ Use a wildcard to move an alternate domain nameContact AWS Support to move an al
-# Move the alternate domain name
+# Choose how to move the alternate domain name
@@ -12,0 +13,7 @@ Depending on your situation, choose from the following ways to move the alternat
+**The target is a distribution tenant**
+    
+
+When you create or update the target distribution tenant, set `OnDomainTakeover` to `allow`. This works whether the source is in the same AWS account or a different one, and the source doesn't need to be disabled. For more information, see Move domains when you create or update a distribution tenant.
+
+To move a domain that's serving traffic, use **update-domain-association** instead, which checks that a certificate covers the domain. For more information, see Migrate a live domain without downtime.
+
@@ -18 +25 @@ Use the **update-domain-association** command in the AWS Command Line Interface
-This command works for all same-account moves, including when the alternate domain name is an apex domain (also called a _root domain_ , like example.com).
+This command works for all same-account moves, including when the alternate domain name is an apex domain (also called a _root domain_ , like example.com). For same-account moves, it doesn't require a DNS record that points to the target.
@@ -23 +30 @@ This command works for all same-account moves, including when the alternate doma
-If you have access to the source standard distribution or distribution tenant, the alternate domain name is _not_ an apex domain, and you are not already using a wildcard that overlaps with that alternate domain name, use a wildcard to move the alternate domain name. For more information, see Use a wildcard to move an alternate domain name.
+Use the **update-domain-association** command. The source standard distribution or distribution tenant can be enabled, so viewers keep reaching the domain during the move. A DNS record must prove that you control the alternate domain name, as described in [Set up the target standard distribution or distribution tenant](./alternate-domain-names-move-create-target.html). This works for apex domains too.
@@ -25 +32 @@ If you have access to the source standard distribution or distribution tenant, t
-If you don’t have access to the AWS account that has the source standard distribution or distribution tenant, you can try using the **update-domain-association** command to move the alternate domain name. The source standard distribution or distribution tenant must be disabled before you can move the alternate domain name. For additional help, see Contact AWS Support to move an alternate domain name.
+You can also use a wildcard to move the alternate domain name. For more information, see Use a wildcard to move an alternate domain name. For additional help, see Contact AWS Support to move an alternate domain name.
@@ -29 +36 @@ Note
-You can use the **associate-alias** command, but this command only supports standard distributions. See [AssociateAlias](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_AssociateAlias.html) in the _Amazon CloudFront API Reference_.
+We recommend that you use **update-domain-association**. You can use the **associate-alias** command, but this command only supports standard distributions. See [AssociateAlias](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_AssociateAlias.html) in the _Amazon CloudFront API Reference_.
@@ -46 +53,5 @@ Note the following restrictions
-     * If the source and target distributions (standard or tenant) are in different AWS accounts, the source must be disabled before you can move the domain.
+     * If the source and target distributions (standard or tenant) are in different AWS accounts, a DNS record must point the domain to the target, as described in [Set up the target standard distribution or distribution tenant](./alternate-domain-names-move-create-target.html). The source can be enabled.
+
+     * If the source and target are in different AWS accounts, and the source AWS account also serves the domain with `anycast-ip-list-only`, the move fails with `InvalidAssociation`. For more information, see [Serve domains on specific IP addresses with address-based selection](./address-based-selection.html).
+
+     * If the target is a distribution tenant, it doesn't already serve the domain with `anycast-ip-list-only`.
@@ -92,0 +104,2 @@ Note the following restrictions
+       * You must create the DNS TXT record that associates the alternate domain name with the target standard distribution, even if the source and target standard distributions are in the same AWS account. Otherwise, the command fails with **`Invalid or missing alias DNS TXT records`**.
+
@@ -107,0 +121,188 @@ For more information, see the [associate-alias](https://awscli.amazonaws.com/v2/
+## Migrate a live domain without downtime
+
+To move a domain that's serving traffic, use **update-domain-association**. It moves the domain only if a certificate on the target covers it, so HTTPS keeps working through the move. Prove that you control the domain before the move, and point the domain to the target only after the move. Viewers keep using the source's DNS name until the domain has moved, and CloudFront keeps serving the domain throughout. Because the domain still points to the source, you can also roll back without changing the DNS record that viewers use.
+
+Important
+
+This procedure applies when viewers reach the domain through the shared CloudFront IP addresses. If the source or the target uses Anycast static IPs, a live migration doesn't work the same way. Requests that still arrive on the source's Anycast static IP addresses after the move might fail until viewers pick up the DNS change, so lower the TTL first and update the domain's DNS record as soon as the move completes.
+
+###### To migrate a live domain
+
+  1. Lower the TTL of the domain's DNS record, so that viewers pick up the DNS change in step 6 quickly.
+
+  2. Make sure that a certificate on the target covers the domain. For a distribution tenant, this can be the distribution tenant's certificate or its multi-tenant distribution's certificate. If no certificate covers the domain, **update-domain-association** doesn't move it.
+
+  3. If the source and the target are in different AWS accounts, create a TXT record that associates the domain with the target. Leave the DNS record that viewers use, such as a CNAME or alias record, pointing to the source. The DNS check passes on a record that points to the resource that you move the domain to, and a record that points to a different CloudFront resource doesn't block the move. So the TXT record lets you move the domain to the target, and a CNAME record that viewers use lets you move it back to the source, without a DNS change in between.
+
+If the source and the target are in the same AWS account, skip this step. **update-domain-association** doesn't check DNS for moves within one AWS account, in either direction.
+
+The name of the TXT record depends on the type of domain. The value is the CloudFront domain name of the target standard distribution, or the routing endpoint of the target distribution tenant's connection group, such as d111111abcdef8.cloudfront.net.
+
+Domain type | Domain | TXT record  
+---|---|---  
+Subdomain | `www.example.com` | `_www.example.com TXT d111111abcdef8.cloudfront.net`  
+Apex (root) domain | `example.com` | `_.example.com TXT d111111abcdef8.cloudfront.net`  
+Wildcard domain | `*.example.com` | `_*.example.com TXT d111111abcdef8.cloudfront.net`  
+  
+  4. Using credentials for the AWS account that owns the target, get the target's current ETag, and then move the domain. Replace the IDs, the ETag, and the domain with your own.
+    
+        aws cloudfront get-distribution-tenant --id dt_9Fd3xTZq7Hl2KABC
+    
+    aws cloudfront update-domain-association \
+      --domain "www.example.com" \
+      --target-resource DistributionTenantId=dt_9Fd3xTZq7Hl2KABC \
+      --if-match E3UN6WX5ABC123
+
+If the target is a standard distribution, use **get-distribution** and specify `DistributionId=`EDFDVBD6EXAMPLE`` for `--target-resource`. When the change reaches the edge locations, CloudFront routes requests for the domain to the target, including requests that still arrive through the source's DNS name.
+
+  5. After the target is deployed, check that it serves the domain as expected. If it doesn't, move the domain back by running **update-domain-association** again with the source as the target resource, using credentials for the source's AWS account. You don't need to change DNS first. For a move between AWS accounts, both records from step 3 are already in place, so the move back passes on the CNAME record that viewers use, which points to the source, and the TXT record that points to the target doesn't block it. If you already pointed the domain to the target in step 6, point it back to the source first.
+
+If viewers reach the domain through an alias record, as is common for an apex domain, the alias record doesn't pass the DNS check, so the TXT record is the only proof that you control the domain. Before you move the domain back to a source in a different AWS account, update the TXT record from step 3 to associate the domain with the source.
+
+  6. In your DNS configuration, point the domain to the target. For a distribution tenant, use the routing endpoint of its connection group. For more information, see [Point domains to CloudFront](./managed-cloudfront-certificates.html#point-domains-to-cloudfront). If you need to roll back after this step, first point the domain back to the source, and then move the domain back as described in step 5.
+
+  7. After the old DNS TTL has passed and you no longer need to roll back, you can delete the TXT record, if you created one, and the source's configuration for the domain.
+
+
+
+
+The target's cache starts empty, so your origin receives more requests right after the move. To limit the impact, move a few domains at a time.
+
+## Move domains when you create or update a distribution tenant
+
+When you create or update a distribution tenant, you can move domains that are already associated with another standard distribution or distribution tenant to the distribution tenant in the same request. To do this, set `OnDomainTakeover` in the [CreateDistributionTenant](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistributionTenant.html) or [UpdateDistributionTenant](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistributionTenant.html) request. Valid values are:
+
+  * `reject` (default) – If a domain in the request is already associated with another standard distribution or distribution tenant, the request fails with `CNAMEAlreadyExists`.
+
+  * `allow` – CloudFront moves each domain in the request that's already associated with another standard distribution or distribution tenant to this distribution tenant.
+
+
+
+
+Unlike **update-domain-association** , which moves one domain at a time to an existing resource, this moves up to 5 domains as part of creating or updating the distribution tenant.
+
+CloudFront removes the domains from their sources and creates or updates the distribution tenant in one operation. If CloudFront can't move one of the domains, the request fails and no domains move.
+
+For each domain that CloudFront moves, the following must be true:
+
+  * A DNS record proves that you control the domain and points the domain to this distribution tenant. Usually, this is the domain's CNAME record. Use one of the following records:
+
+    * A CNAME record that points the domain to the routing endpoint of the distribution tenant's connection group.
+
+    * An A record that resolves the domain to the Anycast static IP addresses of the distribution tenant's connection group.
+
+    * A TXT record that associates the domain with the routing endpoint of the distribution tenant's connection group.
+
+The name of the TXT record depends on the type of domain. The value is the CloudFront domain name of the target standard distribution, or the routing endpoint of the target distribution tenant's connection group, such as d111111abcdef8.cloudfront.net.
+
+Domain type | Domain | TXT record  
+---|---|---  
+Subdomain | `www.example.com` | `_www.example.com TXT d111111abcdef8.cloudfront.net`  
+Apex (root) domain | `example.com` | `_.example.com TXT d111111abcdef8.cloudfront.net`  
+Wildcard domain | `*.example.com` | `_*.example.com TXT d111111abcdef8.cloudfront.net`  
+  
+An apex domain, such as `example.com`, can't have a CNAME record, and an alias record that resolves the domain to the shared CloudFront IP addresses doesn't prove that you control the domain. For an apex domain, use a TXT record, or an A record that resolves to the Anycast static IP addresses of the connection group.
+
+CloudFront checks DNS for every domain that it moves, including when the source and the distribution tenant are in the same AWS account.
+
+  * The source isn't owned by an AWS account that CloudFront blocks from moving domains, or by another AWS service.
+
+  * If the source is in a different AWS account, that AWS account doesn't also serve the domain with `anycast-ip-list-only`. Otherwise, the request fails with `InvalidAssociation`. For more information, see [Serve domains on specific IP addresses with address-based selection](./address-based-selection.html).
+
+
+
+
+A move can remove the last domain from the source standard distribution or distribution tenant.
+
+A certificate isn't required to move a domain. If a certificate on the distribution tenant or its multi-tenant distribution covers the domain, CloudFront serves the domain over HTTPS as soon as it moves. If no certificate covers the domain, CloudFront still moves it and serves it over HTTP only, so HTTPS requests for the domain fail until you add a certificate. For more information, see [Serve distribution tenant domains without a certificate](./tenant-domains-without-certificate.html).
+
+If you request a CloudFront managed certificate for a domain that you're moving, CloudFront moves the domain when you make the request, and HTTPS requests for the domain fail until the certificate is issued. If you request the managed certificate with self-hosted validation and CloudFront can't verify the DNS record for a domain, the request fails and no domains move.
+
+Important
+
+CloudFront doesn't keep a record of where a moved domain came from. If you later remove the domain from the distribution tenant, delete the distribution tenant, or roll back the change, for example in a CloudFormation stack rollback, CloudFront doesn't return the domain to the source. CloudFront stops serving the domain until you add it to a resource again.
+
+To undo a move, move the domain back to the original resource instead of removing it from the distribution tenant. For more information, see Move a domain back to its original resource.
+
+###### To move domains when you update a distribution tenant
+
+  1. If the source serves a domain over HTTPS, add a certificate that covers the domain to the distribution tenant or its multi-tenant distribution.
+
+Warning
+
+If no certificate covers the domain, HTTPS requests for the domain start failing when it moves. To have CloudFront check this for you, move the domain with **update-domain-association** instead. For more information, see Migrate a live domain without downtime.
+
+  2. Set up the DNS record for each domain that you're moving, as described earlier in this topic. For example, create a CNAME record that points `www.example.com` to the routing endpoint of the target distribution tenant's connection group. For an apex domain, create a TXT record, or an A record that resolves the domain to the Anycast static IP addresses of the connection group.
+
+Note
+
+Until the move completes, the source continues to serve the domain.
+
+  3. Update the distribution tenant with the full list of its domains, including the domains that you're moving, and set `--on-domain-takeover` to `allow`.
+    
+        aws cloudfront update-distribution-tenant \
+      --id dt_9Fd3xTZq7Hl2KABC \
+      --if-match E3UN6WX5ABC123 \
+      --domains '[{"Domain": "app.example.com"}, {"Domain": "www.example.com"}]' \
+      --on-domain-takeover allow
+
+If the request succeeds, the response lists the moved domains in `Domains`. CloudFront doesn't return `OnDomainTakeover` in the response, and you must set it again in each request that moves domains.
+
+
+
+
+To move domains while you create a distribution tenant, add `--on-domain-takeover allow` to the **create-distribution-tenant** command.
+
+### Move a domain back to its original resource
+
+To undo a move, move the domain from the distribution tenant back to the original standard distribution or distribution tenant instead of removing it from the distribution tenant. Choose one of the following options.
+
+update-domain-association (any original resource)
+    
+
+###### To move a domain back with `update-domain-association`
+
+  1. If the original resource is in a different AWS account than the distribution tenant, make sure that the original resource is set up as described in [Set up the target standard distribution or distribution tenant](./alternate-domain-names-move-create-target.html), including a DNS record that proves that you control the domain. You don't need to disable the distribution tenant that has the domain now.
+
+  2. Using credentials for the AWS account that owns the original resource, get the resource's current ETag. Replace the ID with your own.
+    
+        aws cloudfront get-distribution --id EDFDVBD6EXAMPLE
+
+If the original resource is a distribution tenant, use **get-distribution-tenant** instead.
+
+  3. Move the domain to the original resource. Replace the domain, the resource ID, and the ETag with your own.
+    
+        aws cloudfront update-domain-association \
+      --domain "www.example.com" \
+      --target-resource DistributionId=EDFDVBD6EXAMPLE \
+      --if-match E2QWRUHEXAMPLE
+