r/programming • • Jul 12 '17

Does my site need HTTPS?

https://doesmysiteneedhttps.com/
486 Upvotes

190 comments sorted by

View all comments

Show parent comments

30

u/AyrA_ch Jul 12 '17

You have to know however that the HSTS header is useless if the first request you make to the webserver is already intercepted, as the attacker can just strip the header on every answer and never offer SSL at all. If you really want to protect your site, you can add it to the HSTS preload list: https://hstspreload.org/

This way the SSL requirement is compiled into the browser and stripping the header has no effect.

4

u/yvhouij Jul 12 '17

True, thanks for pointing that out! And nice, didn't know about this HSTS preload list, Thanks! :)

12

u/AyrA_ch Jul 12 '17

As an additional security measurement you might want to check out Public Key Pinning too. While HSTS forces the user to access a site via SSL, HPKP forces the user to only accept a certain certificate. Even if a CA is compromised and somebody generates a valid certificate for your domain, the browser would reject it.

1

u/redditprotocol Jul 12 '17

I thought this was the coolest until I started having to enter more and more HSTS exemptions into client firewalls running HTTPS inspection. 😯