GTMRun

HTTPS, redirects & HSTS

Last updated: 2026-11-16

Site loads over HTTPS #

Google recommendation

What it is and why it matters #

HTTPS encrypts traffic between your visitors and your site. Google lists secure serving as part of page experience, and browsers label plain-HTTP sites "Not secure". That's a conversion problem before it's an SEO one.

How we check it #

We request https://yourdomain.com/ and pass this check if it responds.

How to fix #

Every modern host issues free certificates: Vercel, Netlify, Cloudflare, GitHub Pages, and AWS (ACM with CloudFront). Add your domain in the host's dashboard and follow its DNS instructions. For CloudFront, request an ACM certificate in us-east-1 and attach it to the distribution.

http:// redirects to https:// #

Google recommendation

What it is and why it matters #

Anyone who types your domain without https:// (and old links) should land on the secure version through a permanent (301/308) redirect. That keeps one canonical version of each page for Google and people.

How we check it #

We request http://yourdomain.com/ and pass this check if we end up on an https:// URL.

How to fix #

CloudFront
Behavior → Viewer protocol policy → "Redirect HTTP to HTTPS"
Vercel / Netlify / GitHub Pages
On by default once HTTPS is active (GitHub Pages: tick "Enforce HTTPS").
Cloudflare
SSL/TLS → Edge Certificates → "Always Use HTTPS" → On

HSTS header set #

GTMRun heuristic

What it is and why it matters #

Strict-Transport-Security tells browsers to use HTTPS for your domain for a period of time, even if a link says http://. It closes the gap before the first redirect. It's a security best practice, not a Google ranking factor. We score it because it's part of a trustworthy foundation, and say so plainly.

How we check it #

We read the Strict-Transport-Security header on your HTTPS homepage and pass this check if it contains max-age=.

How to fix #

Start with a short max-age and raise it once you're sure every subdomain works over HTTPS:

Strict-Transport-Security: max-age=31536000
CloudFront
Behavior → Response headers policy → "Managed-SecurityHeadersPolicy"
(sets HSTS max-age=31536000 plus nosniff, frame and referrer headers).
Or create a custom policy to choose your own values.
Vercel (vercel.json)
{ "headers": [{ "source": "/(.*)", "headers": [
  { "key": "Strict-Transport-Security", "value": "max-age=31536000" } ] }] }
Netlify (_headers)
/*
  Strict-Transport-Security: max-age=31536000
Cloudflare
SSL/TLS → Edge Certificates → HTTP Strict Transport Security (HSTS) → Enable

Verify it yourself #

curl -sI http://yourdomain.com/  | grep -i '^location'
curl -sI https://yourdomain.com/ | grep -i strict-transport

Runs GTMRun's own checks only — seconds, no third-party calls.

Tips #

  • Be careful with includeSubDomains and preload. They apply HSTS to every subdomain and are hard to undo. Only add them once all subdomains serve HTTPS.
  • Mixed content (http:// images or scripts on an https:// page) breaks the padlock. Browser dev tools list every offending URL.
  • What we learned: the legacy gtmrun.co app passed HTTPS and redirect but not HSTS, because its CloudFront distribution had no response-headers policy. This site sets HSTS through CloudFront's managed security-headers policy — one setting, no code.

Sources #