Apply subdomain coverage without confusing policy ownership
04A Domain Name System (DNS) name is a sequence of dot-separated labels, such as shop, example and com. HSTS compares the complete host name or whole labels to its right. Optional includeSubDomains extends a parent’s policy downward, while each host still owns its separate record.
Separate alternative: both parent and child had their own records. The parent validly sends max-age=0 and removes its record. The child’s still-active independent record remains; this deletion does not clear an entire domain tree.
Source for this drawing: RFC 6797 · Read RFC section 8.2 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
A child cannot cancel an active parent policy; deleting a parent does not erase a child’s separate policy.
- The browser compares already IDNA-canonicalized domain labels using ASCII case-insensitive matching. IDNA means Internationalized Domain Names for Applications; its validation and conversion occur before these rules. Raw Unicode case conversion is not a substitute.
- An exact known host match applies regardless of its includeSubDomains flag. A parent-domain match applies to descendants only when that parent’s includeSubDomains flag is set. A host cannot set policy for its parent or sibling merely by sending its own header.
- Matching is label-by-label, not an arbitrary text suffix: badexample.com and example.com.evil.test are not descendants of example.com. shop.example.com is a descendant; policies do not require a DNS lookup to test this relationship.
- A child receiving max-age=0 deletes only its own record. An unexpired ancestor’s includeSubDomains policy still applies. Conversely, deleting an ancestor’s record leaves separately learned child records intact.
- Administrators need to consider every covered HTTP service, including alternate ports and descendants that cannot serve valid HTTPS. Merely intending a parent policy is insufficient if the browser never receives it; each common entry point should advertise its own policy (non-normative §11.4).
The scenes use example.com and shop.example.com, and show separate alternatives. The bounded helper accepts ordinary preprocessed ASCII example hostnames only; it is not a URI parser, full IDNA implementation or public-suffix policy service. Rejected4075/5204/8153 are not adopted as new requirements.
Read the RFC section ↗