Reliable HTTPS comes first. A long-lived browser policy should be the result of a working deployment, not the first experiment.
1. Verify HTTPS
Check the certificate, hostname coverage, renewal, redirects, and representative application flows. Serve the intended website over HTTPS before changing HSTS. Check HTTP and HTTPS variants as well as the hostnames users actually visit.
2. Start with a short policy
Strict-Transport-Security: max-age=300
This five-minute example limits the lifetime while you validate deployment. Send it on HTTPS responses. It does not redirect the first HTTP visit; configure that separately at the server or hosting layer.
3. Review the scope
Inventory subdomains, delegated services, legacy endpoints, and development hosts before adding includeSubDomains. A parent domain's policy can require HTTPS for all of them. Add a longer lifetime only after certificates and operational recovery are dependable.
For example, max-age=31536000 lasts a year. Subdomain coverage and preload are additional decisions, not automatic ingredients for every website.
4. Plan recovery
Browsers retain learned HSTS until it expires or receives a valid HTTPS policy that changes it. Removing the header from the server does not instantly remove a stored policy. An HTTPS max-age=0 response can clear the host's learned policy, but separate subdomain policies and preload entries need separate consideration.
Preloading is not a routine next step after enabling HSTS. Review the preload service's current guidance, requirements, and removal procedure before opting in. See the HSTS reference for how the browser applies the header.