Skip to content
RU
← All HTTP Headers
Security

Strict-Transport-Security

Instructs browsers to only access the site via HTTPS, protecting against protocol downgrade attacks and cookie hijacking.

Syntax

Strict-Transport-Security: max-age=<seconds>; includeSubDomains; preload

Example

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

Description

The Strict-Transport-Security (HSTS) header tells browsers to only communicate with the server using HTTPS. Once received, the browser will automatically convert all HTTP requests to HTTPS for the specified duration.

The max-age directive specifies how long (in seconds) to enforce HTTPS. includeSubDomains extends this to all subdomains. preload allows inclusion in browser HSTS preload lists.

HSTS prevents man-in-the-middle attacks, SSL stripping, and cookie hijacking. Use at least 1 year (31536000 seconds) for production.

How real sites send this header

Home-page responses of 503 popular sites from the enterno.io /check catalogue, checked in the last 30 days.

63.0% (317 of 503) send Strict-Transport-Security.

Most common values:

  • max-age=31536000 — 66 sites
  • max-age=31536000; includeSubDomains; preload — 53 sites
  • max-age=31536000; includeSubDomains — 49 sites

See it on: yandex.ru, discord.com, github.com, habr.com, cloudflare.com

State of Web Security, November 2026: of 5,501 HTTPS home pages in the report,

  • 58.2% send HSTS
  • 44.8% max-age of a year or more
  • 16.3% ready for the preload list

Full report and methodology

Check if your website sends this header correctly

Check your headers →

Related Articles

Related Headers

Related guides

Longer-form reading on this topic from the knowledge base.

Automate this check

Set up continuous monitoring and get an alert when something breaks. No manual runs to remember.