Hsts disabled
Quick winSet a valid HTTP Strict-Transport-Security (HSTS) header with a max-age of at least 31536000 (one year) and includeSubDomains to force browsers to always use HTTPS for your store.
What it is
HTTP Strict-Transport-Security (HSTS) is a security header your web server sends to browsers. It tells the browser: "Never load this site over plain HTTP — always use HTTPS, no matter what." Once a browser sees this instruction, it enforces HTTPS automatically for the duration you specify (the max-age, measured in seconds). A max-age=0 effectively disables HSTS, meaning the browser forgets the rule immediately and offers no protection. The correct setting is max-age=31536000 (one year) with includeSubDomains so all parts of your site are covered.
Why it matters
Without a valid HSTS header, shoppers who type your domain into a browser or click a plain HTTP link are briefly exposed to a "downgrade attack" — a hacker on the same network (e.g., public Wi-Fi) can intercept that first unencrypted request and silently redirect them to a fake version of your store, stealing passwords, credit card numbers, or session cookies. This is classified under OWASP's A02:2021 Cryptographic Failures, one of the most exploited vulnerability categories in real-world breaches. Beyond security, Google has used HTTPS as a ranking signal since 2014, and browsers display "Not Secure" warnings that destroy shopper trust and conversion rates. Fixing HSTS is a free, low-effort change with immediate security and trust benefits.
How to fix it
- Confirm your store is fully served over HTTPS and that your SSL/TLS certificate is valid and auto-renewing — HSTS should never be enabled on a site that still has HTTP-only pages.
- Identify where HTTP response headers are set for your store: your hosting control panel, CDN/proxy (e.g., Cloudflare), web server config file (nginx or Apache), or your platform's admin.
- Add or update the Strict-Transport-Security header to: Strict-Transport-Security: max-age=31536000; includeSubDomains
- Optionally append ; preload to the header value and submit your domain at hstspreload.org to be hard-coded into browsers — this is the strongest protection but is irreversible without a long wait, so only do it when you are certain all subdomains will remain on HTTPS.
- Deploy the change and verify it using your browser's DevTools (Network tab → click your domain → Response Headers) or a free online HSTS checker — confirm max-age is 31536000 and there is no max-age=0.
- Monitor your SSL certificate expiry dates; an expired certificate on an HSTS-enabled site will hard-block visitors and cannot be bypassed by clicking through a warning.
Fix it on your platform
Pick your platform for the exact steps.
How to fix hsts disabled on Shopify
- Shopify automatically enforces HTTPS and sets HSTS for all stores on the shopify.com infrastructure — you cannot and do not need to set it manually in the Shopify admin.
- If you use a custom domain, go to Admin → Settings → Domains and ensure your domain shows a green 'Connected and redirecting to HTTPS' status; Shopify then manages the HSTS header for you.
- If your store sits behind a custom reverse proxy or a third-party CDN (e.g., Cloudflare in front of Shopify), set the HSTS header in that proxy layer — see the Cloudflare steps below.
- Verify the live header at your domain using browser DevTools (F12 → Network → your domain request → Response Headers) and confirm Strict-Transport-Security is present with max-age=31536000.
How to fix hsts disabled on Shopify Plus
- Shopify Plus manages HSTS at the platform level for storefronts hosted on Shopify infrastructure — no manual header configuration is required or available in the admin.
- For headless/custom storefronts or any reverse-proxy layer you control in front of Shopify Plus, add the Strict-Transport-Security header in your proxy/CDN configuration (e.g., Cloudflare, Fastly, or your own nginx/Node server).
- In Cloudflare: Log in → select your domain → Security → Settings → enable HTTP Strict Transport Security (HSTS) → set Max Age to 12 months, tick includeSubDomains.
- Verify with DevTools: F12 → Network → reload page → click the document request → Response Headers → look for Strict-Transport-Security: max-age=31536000; includeSubDomains.
How to fix hsts disabled on WooCommerce
- WooCommerce runs on WordPress, so HSTS must be set at the web server or hosting level, not inside the WordPress admin.
- For Apache hosting: open or create a .htaccess file in your site root (via File Manager in cPanel or via FTP) and add inside the <IfModule mod_headers.c> block: Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
- For Nginx hosting: open your server block config (e.g., /etc/nginx/sites-available/yoursite.conf) and add inside the server {} block: add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; — then run nginx -t and sudo systemctl reload nginx.
- Alternatively, install the free 'Headers and Footers by WPBeginner' plugin or 'WP Headers and Footers' — however, note that PHP-level headers must be set before any output; using a caching plugin or server-level config is more reliable.
- If you use a managed WordPress host (WP Engine, Kinsta, Flywheel), open a support ticket or use their dashboard's 'Security Headers' section — many set HSTS for you automatically.
- Verify with DevTools or curl: curl -I https://yourdomain.com | grep -i strict
How to fix hsts disabled on BigCommerce
- BigCommerce manages HSTS at the platform infrastructure level for all storefronts — the header is set automatically and you cannot configure it manually from the admin.
- If your BigCommerce store is fronted by Cloudflare or another CDN/proxy that you control, ensure that proxy is not stripping or overriding the HSTS header.
- To check: go to your storefront URL in a browser, open DevTools (F12) → Network tab → click the top-level document request → Response Headers, and confirm Strict-Transport-Security is present.
- For headless BigCommerce setups (Next.js, Nuxt, custom front-end), set the HSTS header in your front-end server or CDN configuration — see the Headless/Custom entry below.
How to fix hsts disabled on Adobe Commerce (Magento)
- In the Magento Admin, go to Stores → Configuration → General → Web → Base URLs (Secure) and ensure all base URLs use https://.
- For the server-level HSTS header on Apache, add to your VirtualHost config or .htaccess: Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains" — then run apachectl configtest && sudo systemctl reload apache2.
- For Nginx, add to your server {} block in /etc/nginx/sites-available/magento.conf (or equivalent): add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; — then reload nginx.
- If you use Adobe Commerce Cloud (the cloud.magento.com / Fastly setup), add the header in .magento.app.yaml or configure it via the Fastly VCL snippet in Admin → Stores → Fastly Configuration → Custom VCL Snippets.
- Flush the Magento and Varnish/full-page cache after changes: Admin → System → Cache Management → Flush Magento Cache.
- Verify with: curl -I https://yourdomain.com | grep -i strict-transport
How to fix hsts disabled on Magento Open Source
- Set the HSTS header at the Apache or Nginx web server level — the steps are identical to Adobe Commerce (Magento) above.
- For Apache .htaccess in your Magento root, add inside <IfModule mod_headers.c>: Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
- For Nginx server block: add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
- Reload your web server and flush full-page cache: php bin/magento cache:flush
- Verify: curl -I https://yourdomain.com | grep -i strict
How to fix hsts disabled on Wix
- Wix automatically serves all sites over HTTPS and manages the HSTS header at the platform level — you cannot manually configure HTTP response headers from the Wix editor or dashboard.
- Ensure 'Force HTTPS' is enabled: in the Wix dashboard go to Settings → SSL/TLS Certificate → confirm the toggle for 'Force HTTPS redirects' is ON.
- If you need custom security headers (e.g., for a Wix Velo / headless setup), you can set headers within Wix Velo (formerly Corvid) using the http-functions.js file — add a response header in your backend HTTP function.
- Verify the live header using DevTools or an online HSTS checker to confirm the platform is sending the header correctly.
How to fix hsts disabled on Wix Studio
- Like standard Wix, Wix Studio manages HTTPS and HSTS at the infrastructure level — no manual header configuration is available in the Studio editor.
- Confirm HTTPS is forced: Site Settings → SSL → Force HTTPS should be enabled.
- For custom HTTP logic in Wix Studio, use the Velo backend (http-functions.js) to add headers to API/serverless responses if needed.
- Use DevTools to verify the Strict-Transport-Security header is present on your live domain.
How to fix hsts disabled on Squarespace
- Squarespace automatically enables HTTPS and sets an HSTS header for all custom domains — there is no manual header configuration panel in the Squarespace admin.
- Ensure SSL is active: go to Settings → Domains → click your domain → confirm the SSL badge shows 'Active'.
- If your domain was recently connected, wait up to 72 hours for SSL provisioning and HSTS to propagate.
- Verify using DevTools (F12 → Network → your domain → Response Headers) that Strict-Transport-Security is present.
How to fix hsts disabled on Webflow
- Webflow sets HSTS automatically for sites hosted on Webflow's infrastructure (webflow.io or custom domains with Webflow hosting) — no manual configuration is needed.
- Ensure your custom domain is published and SSL is active: go to Site Settings → Publishing → Custom Domain → confirm the green SSL lock icon.
- If you export Webflow code and self-host it, you must set the HSTS header in your own web server (Apache/Nginx) or CDN — follow the generic server steps above.
- Verify with DevTools on your live Webflow-hosted URL.
How to fix hsts disabled on Headless / Custom (I build in code)
- For Node.js/Express, use the helmet middleware: npm install helmet, then app.use(helmet.hsts({ maxAge: 31536000, includeSubDomains: true }));
- For Next.js, add the header in next.config.js inside the headers() async function (see code snippet below).
- For Nginx, add to your server {} block: add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; — then nginx -t && nginx -s reload.
- For Apache, add to VirtualHost or .htaccess: Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
- For Cloudflare (as CDN in front of any stack): Dashboard → your domain → Security → Settings → HTTP Strict Transport Security → Enable, Max Age = 12 months, includeSubDomains = ON.
- Verify with: curl -I https://yourdomain.com | grep -i strict-transport-security
How to fix hsts disabled on PrestaShop
- In PrestaShop Admin, go to Shop Parameters → General → Enable SSL on all pages → set to YES, and Enable SSL → YES.
- Then set the HSTS header at the server level: for Apache, edit .htaccess in your PrestaShop root and add inside <IfModule mod_headers.c>: Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
- For Nginx, add add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; to your server block and reload nginx.
- Verify: curl -I https://yourdomain.com | grep -i strict
How to fix hsts disabled on OpenCart
- Set SSL URLs: Admin → Settings → Store → Server tab → set Use SSL to Yes, and enter your https:// URL in the SSL URL field.
- Set the HSTS header at the Apache or Nginx level — OpenCart itself does not provide a security headers UI.
- Apache (.htaccess in OpenCart root): add Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains" inside <IfModule mod_headers.c>.
- Nginx server block: add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; then reload nginx.
- Verify with DevTools or curl.
How to fix hsts disabled on WordPress.org
- Install a security headers plugin such as 'Headers Security Advanced & HSTS WP' or 'Solid Security (iThemes Security)' from WordPress Admin → Plugins → Add New.
- In the plugin's settings panel, find the HSTS or Security Headers section and enable Strict-Transport-Security with max-age set to 31536000 and 'Include Subdomains' enabled.
- Alternatively, add the header directly in your theme's functions.php (child theme recommended): `add_action('send_headers', function(){ header('Strict-Transport-Security: max-age=31536000; includeSubDomains'); });`
- For server-level control, edit your Nginx or Apache config as described in the WooCommerce steps above — this is the most reliable method.
Does your site have this issue?
Run a free SEOLZ scan to find hsts disabled — and every other issue — across your whole site in minutes.
Scan my site freeFrequently asked questions
What is Hsts disabled?
HTTP Strict-Transport-Security (HSTS) is a security header your web server sends to browsers. It tells the browser: "Never load this site over plain HTTP — always use HTTPS, no matter what." Once a browser sees this instruction, it enforces HTTPS automatically for the duration you specify (the max-age, measured in seconds). A max-age=0 effectively disables HSTS, meaning the browser forgets the rule immediately and offers no protection. The correct setting is max-age=31536000 (one year) with includeSubDomains so all parts of your site are covered.
Why does hsts disabled matter?
Without a valid HSTS header, shoppers who type your domain into a browser or click a plain HTTP link are briefly exposed to a "downgrade attack" — a hacker on the same network (e.g., public Wi-Fi) can intercept that first unencrypted request and silently redirect them to a fake version of your store, stealing passwords, credit card numbers, or session cookies. This is classified under OWASP's A02:2021 Cryptographic Failures, one of the most exploited vulnerability categories in real-world breaches. Beyond security, Google has used HTTPS as a ranking signal since 2014, and browsers display "Not Secure" warnings that destroy shopper trust and conversion rates. Fixing HSTS is a free, low-effort change with immediate security and trust benefits.
How do I fix hsts disabled?
Set a valid HTTP Strict-Transport-Security (HSTS) header with a max-age of at least 31536000 (one year) and includeSubDomains to force browsers to always use HTTPS for your store.
Authoritative references
- OWASP Top Ten — OWASP
- OWASP Cheat Sheet Series — OWASP
- Secure Headers Project — OWASP
- HTTP Strict-Transport-Security (HSTS) — MDN