Visual RFC.
ALL RFCs / RFC 6797
Read the RFC ↗
RFC 6797 / BROWSER TRANSPORT POLICY

Map ports and understand the first-visit boundary

05

HSTS changes how the browser prepares an HTTP load. It does not make a server speak TLS, repair a certificate, protect every other protocol or guarantee a safe first visit to a previously unknown host.

RFC 6797 · § 8.3EXAMPLE
4 / 4
Map ports and understand the first-visit boundaryAlternative first visit with preconfigured policy: local rewrite occurs before the first HTTPS request; no preload enrollment protocol is implied.Rewrite before the networkBrowserexample.comfirst request: HTTPSApplicable preconfigured policyHTTP link → local HTTPS rewriteNo first HTTP request sentPreloading is separate configurationThese are alternatives, not one connection
04
Upgrade first when policy is already preconfigured.

Alternative first visit: the browser already has an applicable preconfigured policy. It rewrites the HTTP link before any outgoing request and attempts HTTPS. This mitigates this bootstrap gap; it does not guarantee the site, device or content is trustworthy.

Source for this drawing: RFC 6797 · Read RFC section 8.3 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
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.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

A remembered or preconfigured policy upgrades before the network; an unknown host may still have a bootstrap gap.

  • For an applicable HTTP URL, an explicit port 80 MUST become 443. A different explicit port MUST be preserved. If the URL has no explicit port, the browser MUST NOT add one. Paths and queries are not rewritten by this port rule.
  • HSTS applies to HTTP over all ports on the known host. http://example.com:8080/ becomes https://example.com:8080/, not port443. If that port serves only plain HTTP, the secure connection fails; there is no HSTS-authorized HTTP fallback.
  • Without already learned, user-configured or preloaded HSTS, a first plain HTTP visit can be intercepted. A server SHOULD send a permanent HTTPS redirect, but that first insecure exchange remains exposed (§7.2 and §14.6). This is not a claim that every current browser always starts insecurely.
  • A browser vendor’s preconfigured HSTS list can mitigate that bootstrap gap (§12.3, non-normative advice). This RFC does not define enrollment requirements or make a "preload" header token enroll a site automatically.
  • HSTS is not a general anti-phishing or malware defense, does not replace appropriate certificate and application security checks, and does not by itself specify all mixed-content behavior. Its whole-host scope also differs from the scheme/host/port same-origin policy.
DETAILS

The guide uses contemporary HTTPS/TLS terminology rather than recommending the old SSL references in the immutable 2012 text. No preload submission, site configuration change, cookie attack, certificate bypass or real network request is performed by the teaching model.

Read the RFC section ↗

All chapters in RFC 6797

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗