Missing strict transport security
Quick winAdd an HTTP Strict-Transport-Security (HSTS) response header with at least `max-age=31536000; includeSubDomains` to every HTTPS response your store sends.
What it is
HTTP Strict-Transport-Security (HSTS) is a security header your web server sends to browsers to say: "Always use HTTPS when talking to this site — never plain HTTP." Once a browser sees this header, it will automatically upgrade any future HTTP requests to HTTPS for the duration you specify (the `max-age`, measured in seconds). Without it, a visitor who types your domain or follows an old HTTP link could briefly connect over an unencrypted connection before being redirected, which is a window an attacker can exploit.
Why it matters
Without HSTS, your store is vulnerable to SSL-stripping attacks, where an attacker on the same network (e.g., a coffee shop Wi-Fi) intercepts the first unencrypted HTTP request before your redirect kicks in, silently reading or tampering with the connection. This can expose customer login credentials, payment data, and session cookies — creating serious legal risk under GDPR, CCPA, and PCI-DSS. Google also uses HTTPS as a ranking signal; a missing HSTS header signals an incomplete security posture that can reduce trust scores. Perhaps most directly, browsers increasingly warn users about mixed or insecure connections, and a visible browser security warning will kill conversions instantly.
How to fix it
- Confirm your store is fully served over HTTPS with a valid, trusted TLS certificate before enabling HSTS — adding HSTS to an HTTP or broken-HTTPS site will lock visitors out.
- Decide on your HSTS policy: start with a short max-age (e.g., 300 seconds) in staging to verify nothing breaks, then increase to 31536000 (one year) for production.
- Add the response header `Strict-Transport-Security: max-age=31536000; includeSubDomains` to every HTTPS response. Only add the `preload` directive after you have confirmed the full policy works and you intend to submit to the HSTS preload list.
- Ensure your server or CDN does NOT send the HSTS header on plain HTTP responses — it must only be sent over HTTPS per the spec.
- Verify the header is present by loading your storefront in a browser, opening DevTools → Network tab → click the main document request → inspect Response Headers for `strict-transport-security`.
- Optionally submit your domain to the HSTS preload list (hstspreload.org) once you are confident — this bakes HTTPS enforcement directly into Chrome, Firefox, Safari, and Edge, eliminating the first-visit window entirely.
Strict-Transport-Security: max-age=31536000; includeSubDomainsFix it on your platform
Pick your platform for the exact steps.
How to fix missing strict transport security on Shopify
- Shopify's infrastructure automatically enforces HTTPS and sends the HSTS header for all stores on *.myshopify.com and custom domains connected through Shopify.
- In your Shopify Admin go to Online Store → Domains. Ensure your custom domain is connected and the SSL certificate status shows 'Connected' (green padlock icon).
- Once the domain is connected and SSL is active, Shopify will serve the HSTS header automatically — no code change is needed.
- If you use a custom reverse proxy or a third-party CDN (e.g., Cloudflare) in front of Shopify, configure HSTS in that layer instead (see Cloudflare steps below).
- Verify by opening DevTools → Network → reload your homepage → click the document request → check Response Headers for 'strict-transport-security'.
How to fix missing strict transport security on Shopify Plus
- Same as Shopify above — HSTS is managed at the infrastructure level.
- For Plus stores using Shopify's custom checkout domain or headless storefronts behind a custom CDN/proxy, configure the HSTS header in your CDN or load balancer (e.g., Cloudflare, Fastly, AWS CloudFront) as a custom response header rule.
- In Cloudflare: Security → Settings → enable HSTS, or Rules → Transform Rules → Response Header Modification → add header `Strict-Transport-Security` with value `max-age=31536000; includeSubDomains`.
How to fix missing strict transport security on WooCommerce
- WooCommerce runs on WordPress, so HSTS must be set at the server or hosting level — WordPress/PHP itself does not control response headers by default.
- Apache: Open your site's .htaccess file (in the public_html/wp root). Inside the `<IfModule mod_headers.c>` block (or add one), insert: `Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"`. Save and reload Apache.
- Nginx: Edit your server block config (e.g., /etc/nginx/sites-available/yoursite.conf). Inside the `server { ... }` block for port 443, add: `add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;`. Run `nginx -t` then reload Nginx.
- cPanel hosting: Use the 'Headers' module under Apache Configuration, or install the free 'Headers & Options' section in your cPanel's .htaccess editor.
- Plugin alternative: Install the free 'HTTP Headers' plugin by WebFactory (WordPress.org). Go to WP Admin → HTTP Headers → Security → toggle on Strict-Transport-Security → set max-age to 31536000, check includeSubDomains → Save.
- Verify in browser DevTools → Network → document response headers.
How to fix missing strict transport security on BigCommerce
- BigCommerce manages the underlying infrastructure and automatically sends HSTS headers for storefronts on *.bigcommerce.com and SSL-enabled custom domains.
- In your BigCommerce Admin go to Store Setup → Store Profile and ensure your custom domain has an active SSL certificate (BigCommerce provisions this automatically via Let's Encrypt).
- If you are using a custom CDN or reverse proxy (e.g., Cloudflare) in front of BigCommerce, configure HSTS as a custom response header in your CDN dashboard.
- For Cloudflare: SSL/TLS → Edge Certificates → Enable HSTS → set Max-Age to 12 months, enable 'Apply HSTS policy to subdomains'.
- Verify with DevTools as described above.
How to fix missing strict transport security on Wix
- Wix manages server infrastructure centrally — you cannot modify HTTP response headers directly via the Wix dashboard.
- Wix automatically serves all sites over HTTPS and applies HSTS headers on its infrastructure. Ensure your custom domain is connected with SSL: Wix Dashboard → Settings → Domains → confirm the padlock/SSL status is active.
- If the header is still reported missing after confirming SSL is active, contact Wix Support — this is an infrastructure-level control outside owner access.
- If you are proxying Wix through Cloudflare, you can layer HSTS on top: Cloudflare Dashboard → SSL/TLS → Edge Certificates → HSTS section → Enable.
How to fix missing strict transport security on Squarespace
- Squarespace handles all SSL and security headers at the infrastructure level; individual header values are not configurable via the Squarespace dashboard.
- Confirm your domain has SSL enabled: Squarespace Admin → Settings → Domains → your domain should show a green lock / 'SSL Active'.
- Squarespace enables HSTS for all sites on its platform. If a scanner flags the header as missing on your Squarespace site, it may be scanning an HTTP URL before the redirect — test the HTTPS version directly.
- If you proxy Squarespace through Cloudflare, add HSTS in Cloudflare: SSL/TLS → Edge Certificates → HSTS → Enable, Max-Age 1 year, Include Subdomains.
How to fix missing strict transport security on Webflow
- Webflow automatically provisions SSL certificates and sends HSTS headers for all sites hosted on Webflow's infrastructure (*.webflow.io and custom domains).
- In your Webflow Dashboard → go to your Project Settings → Publishing → Custom Domain → ensure the domain shows 'SSL Active'.
- Webflow sends HSTS by default once SSL is active — no code change is needed in the Webflow Designer or CMS.
- If you are using a custom reverse proxy or Cloudflare in front of Webflow, configure HSTS there: Cloudflare → SSL/TLS → Edge Certificates → HSTS section → Enable, set max-age to 31536000, enable includeSubDomains.
- Verify in DevTools → Network → document response headers for `strict-transport-security`.
How to fix missing strict transport security on Adobe Commerce (Magento)
- Open your Nginx or Apache virtual host config for the store.
- Nginx: In the SSL server block add: `add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;` — then run `nginx -t && systemctl reload nginx`.
- Apache: In the VirtualHost block for port 443 add: `Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"` — then run `apachectl configtest && systemctl reload apache2`.
- If you use a CDN (Fastly, Cloudflare, Varnish), configure the header there so it is sent on every edge response.
- Adobe Commerce Cloud (cloud.magento.com): Update your `.magento.app.yaml` or configure Fastly via the Magento Admin → Stores → Configuration → Advanced → System → Full Page Cache → Fastly Configuration → Custom VCL snippets to inject the header.
- Flush the Magento full-page cache after any config change: Admin → System → Cache Management → Flush Cache Storage.
- Verify with DevTools or `curl -I https://yourstore.com` and look for the `strict-transport-security` header.
How to fix missing strict transport security on Magento Open Source
- Follow the same Apache/Nginx server-config steps as Adobe Commerce above — they share the same codebase and hosting model.
- Add `add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;` (Nginx) or the equivalent Apache `Header always set` directive in your SSL VirtualHost.
- Alternatively, use a PHP-based approach in Magento's index.php or a custom plugin that calls `header()` before output — but the server-config approach is preferred for performance and reliability.
- Flush Magento caches after any change.
How to fix missing strict transport security on PrestaShop
- PrestaShop runs on Apache or Nginx — add the HSTS header at the server config level.
- Apache: Edit .htaccess in the PrestaShop root or your VirtualHost config. Add inside `<IfModule mod_headers.c>`: `Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"`.
- Nginx: In the SSL server block add: `add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;`
- Reload the web server and verify with DevTools or curl.
How to fix missing strict transport security on OpenCart
- OpenCart runs on Apache/Nginx — add HSTS at the web server config or .htaccess level.
- Apache: In your .htaccess or VirtualHost (SSL section) add: `Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"`.
- Nginx: In your SSL server block add: `add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;`
- Reload the web server. Verify with browser DevTools.
How to fix missing strict transport security on WordPress.org
- WordPress.org (self-hosted) — set HSTS at the server or plugin level, not in WordPress PHP.
- Recommended plugin: Install 'HTTP Headers' by WebFactory from the WordPress plugin directory. Admin → HTTP Headers → Security Headers → Strict-Transport-Security → Enable → set max-age=31536000, check includeSubDomains → Save.
- Server-level (Apache): Add `Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"` inside a `<IfModule mod_headers.c>` block in .htaccess.
- Server-level (Nginx): Add `add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;` in the SSL server block.
- Verify in DevTools → Network → document response headers.
How to fix missing strict transport security on WooCommerce
- WooCommerce is a WordPress plugin — follow the WordPress.org steps above exactly. HSTS is controlled at the server/hosting layer, not within WooCommerce settings.
- If on managed WordPress hosting (WP Engine, Kinsta, SiteGround, etc.), check the hosting dashboard for a 'Security' or 'Headers' panel, or contact support — many managed hosts apply HSTS automatically.
- Plugin option: Use the 'HTTP Headers' plugin as described in the WordPress.org steps above.
Does your site have this issue?
Run a free SEOLZ audit to find missing strict transport security — and every other issue — across your whole site in minutes.
Scan my site freeFrequently asked questions
What is Missing strict transport security?
HTTP Strict-Transport-Security (HSTS) is a security header your web server sends to browsers to say: "Always use HTTPS when talking to this site — never plain HTTP." Once a browser sees this header, it will automatically upgrade any future HTTP requests to HTTPS for the duration you specify (the `max-age`, measured in seconds). Without it, a visitor who types your domain or follows an old HTTP link could briefly connect over an unencrypted connection before being redirected, which is a window an attacker can exploit.
Why does missing strict transport security matter?
Without HSTS, your store is vulnerable to SSL-stripping attacks, where an attacker on the same network (e.g., a coffee shop Wi-Fi) intercepts the first unencrypted HTTP request before your redirect kicks in, silently reading or tampering with the connection. This can expose customer login credentials, payment data, and session cookies — creating serious legal risk under GDPR, CCPA, and PCI-DSS. Google also uses HTTPS as a ranking signal; a missing HSTS header signals an incomplete security posture that can reduce trust scores. Perhaps most directly, browsers increasingly warn users about mixed or insecure connections, and a visible browser security warning will kill conversions instantly.
How do I fix missing strict transport security?
Add an HTTP Strict-Transport-Security (HSTS) response header with at least `max-age=31536000; includeSubDomains` to every HTTPS response your store sends.
Authoritative references
- OWASP Top Ten — OWASP
- OWASP Cheat Sheet Series — OWASP
- Secure Headers Project — OWASP
- HTTP Strict-Transport-Security (HSTS) — MDN