PatchPingsAI-Powered
HomeFeaturesMonitoringPricingHow it worksFAQ
Download free
PatchPings

Secure. Monitor. Fix.

AI-powered website monitoring & audits

Product

  • Features
  • Monitoring
  • Scans
  • DMARC checker
  • SSL checker
  • Headers checker
  • Pricing
  • FAQ
  • Lens
  • WordPress

Company

  • About
  • Knowledge Base
  • Contact

Install

    GET IT ONGoogle Play
    PrivacyExtension privacyCookiesTermsAcceptable useDelete account

    © 2026 PatchPings by CodenVibe IT LLC. All rights reserved.

    PatchPings

    Secure. Monitor. Fix.

    AI-powered website monitoring & audits

    Install

      GET IT ONGoogle Play

      Product

      • Features
      • Monitoring
      • Scans
      • DMARC checker
      • SSL checker
      • Headers checker
      • Pricing
      • FAQ
      • Lens
      • WordPress

      Company

      • About
      • Knowledge Base
      • Contact

      © 2026 PatchPings by CodenVibe IT LLC. All rights reserved.

      PrivacyExtension privacyCookiesTermsAcceptable useDelete account
      PatchPings

      Secure. Monitor. Fix.

      AI-powered website monitoring & audits

      Product

      • Features
      • Monitoring
      • Scans
      • DMARC checker
      • SSL checker
      • Headers checker
      • Pricing
      • FAQ
      • Lens
      • WordPress

      Company

      • About
      • Knowledge Base
      • Contact

      Install

      • GET IT ONGoogle Play

      © 2026 PatchPings by CodenVibe IT LLC. All rights reserved.

      PrivacyExtension privacyCookiesTermsAcceptable useDelete account
      1. Home
      2. /
      3. Knowledge Base
      4. /
      5. What Is HSTS? How to Enable It Safely
      Dev guides 2 min readDec 22, 2025 · Updated Oct 19, 2026

      What Is HSTS and How to Enable It Safely

      What HSTS is, why it matters, and how to enable it safely with a short max-age ramp — not the misconfiguration rescue playbook.

      The PatchPings Team
      Global network globe illustrating a careful HSTS rollout

      HSTS (HTTP Strict Transport Security) is a response header that tells browsers to only ever connect to your domain over HTTPS — no exceptions, no fallback — for a duration you specify. Used correctly it closes off a whole class of downgrade attacks. Used carelessly it can make your domain unreachable for months. This guide explains what HSTS is and how to enable it without the risk.

      What is HSTS

      When a browser sees the Strict-Transport-Security header, it remembers your domain as HTTPS-only for the duration of the max-age value. From then on, even if a user types http:// or clicks an old insecure link, the browser silently upgrades to HTTPS before sending anything. There is no insecure request for an attacker to intercept.

      A complete HSTS headercode
      Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
      • `max-age` — how long (in seconds) the browser remembers the HTTPS-only rule. 31536000 is one year.
      • `includeSubDomains` — applies the rule to every subdomain, not just the apex.
      • `preload` — requests inclusion in the browsers' built-in HSTS list, enforcing HTTPS even on the very first visit.

      Why HSTS can lock you out

      The power of HSTS is also its danger. Once a browser has cached your policy, it will refuse plain HTTP for the entire max-age. If you enable includeSubDomains but one subdomain does not serve valid HTTPS, that subdomain becomes unreachable — and you cannot simply 'turn it off', because every browser that saw the header is enforcing it on its own. With preload, the rule is baked into the browser itself and removal can take months.

      HSTS has no undo button

      Once browsers cache your policy, there is no quick way to reverse it. That is exactly why you ramp up slowly instead of starting at a one-year max-age with preload.

      The safe, staged rollout

      1. 1First, confirm every subdomain you might include serves valid HTTPS with no certificate errors.
      2. 2Start with a short max-age, such as max-age=300 (five minutes), and verify nothing breaks.
      3. 3Increase to a day, then a week, watching for any subdomain issues at each step.
      4. 4Once confident, raise to one year and add includeSubDomains.
      5. 5Only when all of the above is rock solid, add `preload` and submit to the preload list.

      Prerequisites you must not skip

      Before enabling HSTS at all, your HTTP-to-HTTPS redirect must be working and your certificate must be valid across every hostname the policy covers. HSTS assumes HTTPS already works everywhere; it is the lock on a door that must already close properly. Enabling it to 'force' HTTPS on a site that is not fully ready is how lockouts happen.

      Confirm before you commit

      Run a scan to verify HSTS is present and correctly configured, and that your certificate and redirects are solid across all hostnames before you raise max-age or add preload.

      HSTS is one of the highest-value headers you can set — and one of the few that genuinely punishes haste. Make sure HTTPS works everywhere first, ramp the max-age up gradually, and only reach for preload once you are certain. When you are ready for the browser preload list, follow the HSTS preload guide. If you are already locked out or a subdomain is broken, use HSTS misconfiguration fixes.

      #HSTS#HTTPS#Headers#Step-by-step

      Keep reading

      Global HTTPS enforcement concept for HSTS preload list submission
      Dev guides

      HSTS Preload Guide: Browser List Requirements and Rollback Risk

      4 min read
      Shield lockup imagery for diagnosing HSTS misconfigurations
      Dev guides

      HSTS Misconfiguration Fixes

      2 min read
      Abstract network nodes suggesting layered HTTP security header protections
      Security

      What Are HTTP Security Headers? A Complete 2026 Guide

      3 min read
      PatchPings

      Start scanning. It’s free.

      Download PatchPings and run your first full security scan in under a minute. No credit card, no catch.

      GET IT ONGoogle Play

      Free for all signed-in users · Guest mode available · v1.0.0