INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: Route 53 and ACM: names and HTTPS

Route 53 Alias vs CNAME: apex records, targets and TTLs

Alias and CNAME differ in both behavior and where they can be used. Route 53 Alias is an extension for eligible AWS resources or compatible records in the same zone. Compare example.com and www.example.com by name position, target and record type.

What you will learn

Explain apex constraints, Alias target/type rules, TTL behavior and the distinction from HTTP redirects.

Prerequisite

The apex is the top name of a zone: example.com in the example.com zone. A holds IPv4 addresses, AAAA holds IPv6 addresses, and CNAME references another DNS name. No records are created here.

Similar names, different DNS answers

Route 53 Alias and CNAME compared
QuestionAliasCNAME
MechanismAlias target configured on a record such as A/AAAAA record type returning another DNS name
Zone apexAvailable when target/type conditions are metNot allowed
TargetSupported AWS resources or same-type records in the same zoneAnother DNS name
AnswerApplicable A/AAAA or other target valueA name reference followed by further resolution
TTLAWS target default, or referenced record’s TTLTTL configured for the CNAME itself

Alias is not a standalone DNS record type. An A Alias yields the applicable IPv4 answer. It does not allow an arbitrary external hostname to be used as a target.

Check apex and subdomain requirements separately

Two independent DNS examples; arrows are not HTTP redirects
Two independent DNS examples; arrows are not HTTP redirects1: example.com — Choose a compatible A/AAAA Alias or other eligible type — Eligible AWS target. 2: www.example.com — Reference when using CNAME — Another DNS name12example.comEligible AWS targetwww.example.comAnother DNS nameTwo independent DNS examples; arrows are not HTTP redirects1: example.com — Choose a compatible A/AAAA Alias or other eligible type — Eligible AWS target. 2: www.example.com — Reference when using CNAME — Another DNS name12example.comEligible AWStargetwww.example.comAnother DNSname
  1. example.com → Eligible AWS targetChoose a compatible A/AAAA Alias or other eligible type
  2. www.example.com → Another DNS nameReference when using CNAME
example.com
The zone apex
Eligible AWS target
For example, CloudFront
www.example.com
A name below the apex
Another DNS name
Name referenced by a CNAME
A1: establish name, target and requirement first
RequirementDecisionReason
example.com → eligible CloudFront targetConsider a compatible A/AAAA AliasCNAME is unavailable at the apex; verify target support too.
www.example.com → provider-specified external nameConsider the provider’s required CNAMEAn arbitrary external name is not an Alias target.
example.com → a CNAME at www in the same zoneAn apex Alias to that CNAME is not a solutionSame-zone Alias references require matching types; an apex CNAME is also invalid.

Locate the source of the TTL

For an eligible AWS resource, Alias uses the resource’s default TTL rather than an arbitrary Alias-side value. For a record in the same zone, it uses that target record’s TTL. A CNAME and its target’s answer can be cached separately.

A2: reference an A record in the same hosted zone
SettingValueResult
blue.example.com A192.0.2.44 / TTL 90 secondsTarget record; documentation-only IP.
reports.example.com A AliasTarget=blue.example.com AAlias uses 90 seconds, not an independent 10 seconds.

A DNS reference does not rewrite a URL path

A CNAME from www.example.com does not send an HTTP 301/302 redirect. The requested hostname remains in the URL, so the service alias and certificate must cover it. Moving /old to /new is not a DNS-record operation.

  1. Identify apex versus a subordinate name.
  2. Check the service’s required hostname and supported connection method.
  3. For Alias, verify target, record type and same-zone conditions.
  4. Identify the TTL source and distinguish DNS from content caching.
  5. Verify custom-domain/certificate settings and any HTTP redirect separately.

Choose from the name and target

Choose an option to see the result and explanation.

Can example.com be a CNAME at the apex of its example.com zone?
Read the answer and reason

Answer: No; choose a supported alternative · CNAME is unavailable at the apex; evaluate an eligible Alias or other supported contract.

Can Alias target any external hostname?
Read the answer and reason

Answer: Only when the target contract permits it · Check eligible AWS targets or compatible same-zone record conditions.

Which TTL does A2’s reports.example.com Alias use?
Read the answer and reason

Answer: The target’s 90 seconds · A2 references a same-zone A record and uses its TTL.

Can an Alias alone redirect /old to /new?
Read the answer and reason

Answer: No; that requires HTTP-layer behavior · DNS answers name queries; it does not issue path-based HTTP redirects.

Check, then explain in your own words

  1. Separate A1 name and target requirements.
  2. Explain A2’s 90-second result.
  3. Distinguish DNS and content TTLs.
  4. Separate HTTP redirects from DNS references.
Check your understanding: What comes first when choosing Alias or CNAME?

Check apex placement, target support and record-type compatibility.

Similar terminology does not imply identical placement and target rules.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.