Skip to content
Nazmul Nikhil
Menu

Use a Strong HSTS Policy (PageSpeed Insights)

PageSpeed checks your Strict-Transport-Security header. It's informational, but HSTS is easy to add safely. Here's how, step by step.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Use a Strong HSTS Policy (PageSpeed Insights)
Photo: Amol Tyagi on Unsplash

In short

HSTS (Strict-Transport-Security) tells browsers to always use HTTPS for your domain, skipping the insecure first request. PageSpeed checks for a long max-age, includeSubDomains, and preload. It's informational and doesn't change the score. Only add it once HTTPS works everywhere, starting with a short max-age and raising it.

Steps

Strict-Transport-Security: max-age=300

Then, after testing:

Strict-Transport-Security: max-age=31536000; includeSubDomains

Add preload and submit to the HSTS preload list only if you're sure every subdomain will stay on HTTPS; removal is slow.

Apache: Header always set Strict-Transport-Security "max-age=31536000". Cloudflare: SSL/TLS > Edge Certificates > HSTS. Shopify, Webflow and Wix: platform-managed.

The Semrush "HSTS not supported" article in this blog covers the same header.

This guide isn't affiliated with or endorsed by Google.

Sources and references

TAGSPageSpeed InsightsUse a strong hsts policyHsts headerStrict-transport-security
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Page Speed & Core Web Vitals posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com