HSTS header creates a ERR_TOO_MANY_REDIRECTS error

Erik Ellsinger

Well-Known Member
Sep 25, 2015
58
1
8
Sweden
cPanel Access Level
Root Administrator
I've added this HSTS header to the domain example.me:
Code:
<IfModule mod_headers.c>
Header always set Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
</IfModule>
(my .htaccess file contains nothing more)

But when I try to go to example.me in Chrome I get this error message:

ERR_TOO_MANY_REDIRECTS

In the Apache error log I get this:

Too many arguments to directive

I've searched for the correct way of adding a HSTS header if I want to be able to use preload (hstspreload.appspot.com/) and from what I can find my HSTS header is correct. Anyone know what the problem is?
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,216
463
Hello :)

Are there any additional .htaccess files in the account's home directory (above the public_html directory) that could contain additional redirects?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,216
463
I am happy to see you were able to address the issue. Thank you for updating us with the outcome.