1

I could not find one topic on HSTS here on askubuntu.com yet so here it comes:

I want to setup HSTS so that my webserver will force the browsers to use HTTPS.

Does anyone know how to set this up for apache2 in a proper way?

2 Answers 2

1

It's really yout application that should be setting this imho, but you can use Header set to make apache do it:

Header set Strict-Transport-Security "max-age=31536000"
1
  • 1
    Thats also what i tried and i can see that it is implemented in the http header but it is still possible to go to address.com so it does not work?
    – dhojgaard
    Dec 5, 2012 at 23:56
0

Its Really simple you just need to add one line to your .htaccess file on server

Header set Strict-Transport-Security "max-age=31536000" env=HTTPS

Thats it

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .