Skip to content

Instantly share code, notes, and snippets.

Created Mar 22, 2016
What would you like to do?
Strict-Transport-Security Header
// Raw header
Strict-Transport-Security: max-age=31536000
// or
Strict-Transport-Security: max-age=31536000; includeSubDomains
// How to send the response header with PHP
header("Strict-Transport-Security: max-age=31536000");
// How to send the response header with Apache (.htaccess)
<IfModule mod_headers.c>
Header set Strict-Transport-Security "max-age=31536000"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment