Vendor Audit

www, apex and the first redirect

How the site's addresses lead visitors to it: the first redirect from http://, and whether the bare domain and its www form both work and lead to one site. A first redirect to a different host skips HSTS on the name the visitor typed; a form with no DNS records gives some visitors an error; two separate sites split visitors and search results.

How www and apex works

First-hop redirect hygiene is the small but important detail of redirecting users to HTTPS on the same host before redirecting anywhere else. http://example.com should land on https://example.com, which can then redirect to https://www.example.com. Skipping that step (going straight to the www variant) means the apex domain never gets an HSTS header for the user's browser, leaving the next plain-HTTP visit to example.com unprotected.

The apex (example.com) and www (www.example.com) forms of your domain should resolve to one canonical site. MDN's guidance is that a domain picks one canonical hostname (either form is fine) and the other variant redirects to it, or both serve the site and name the same one as canonical with <link rel="canonical">. When the two forms aren't unified, users who type the variant you didn't plan for get either a DNS error (if one form has no A/AAAA records) or a separate split-brain site (if both serve content but neither redirects). If your DNS provider doesn't support apex-level aliasing (ALIAS / ANAME / CNAME-flattening), a free static redirector pointing the apex at the www site is the usual fix.

How to fix it

Redirect http://<domain> to https://<domain> on the same host first; publish DNS records for both the apex and www, and 301-redirect one form to the other.

The 3 www and apex checks Vendor Audit runs

Each check has a fixed set of results, and each result has one rating. These are the exact words the report uses.

Redirect first-hop hygiene

Standard: RFC 6797

What it checks. The first redirect from http:// should go to https:// on the same host.

Why it matters. A first hop to a different host skips this host's HSTS policy.

How to fix it. Redirect http://<domain> to https://<domain> first, then on to the final address.

www and apex resolve

Standard: MDN

What it checks. The bare domain and its www form should both have DNS records.

Why it matters. Visitors who type the missing form, or follow a link to it, get a DNS error.

How to fix it. Publish A or AAAA records (or a CNAME for www) for the missing form, and redirect it to the other with a 301 (MDN, Choosing between www and non-www URLs).

www and apex unified

Standard: MDN

What it checks. The bare domain and its www form should end at the same site: MDN's guidance is to pick one as canonical.

Why it matters. When both serve the site separately, search engines see two copies and visitors can end up on different pages.

How to fix it. Redirect one form to the other with a 301, or serve both with <link rel="canonical"> naming the same one on each (MDN, Choosing between www and non-www URLs).

Related

HTTP to HTTPS redirect · HSTS · TLS and certificates