Welcome to WebmasterWorld Guest from 3.233.226.151

Forum Moderators: phranque

Message Too Old, No Replies

HTTPS Security Headers

Headers to expect from an SSL site

     
11:14 am on Oct 23, 2017 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member dstiles is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:May 14, 2008
posts:3286
votes: 19


The headers below SHOULD be set up for HTTPS sites to be REASONABLY secure and may be used to verify sites if required. Settings are taken from my own SSL web sites. Some sites may need different values (eg to enable in-line javascript). I recommend Scott Helme's site for details.

httpOnlyCookies true
requireSSL true

Name: Strict-Transport-Security
Value: max-age=15552001; includeSubDomains; preload

Name: X-Frame-Options
Value: DENY

Name: X-Xss-Protection
Value: 1; mode=block

Name: X-Content-Type-Options
Value: nosniff

Name: X-Permitted-Cross-Domain-Policies
Value: none

Name: Referrer-Policy
Value: strict-origin-when-cross-origin

Name: Content-Security-Policy
Value: default-src 'self'; style-src 'self' 'unsafe-inline';
(for javascript add: script-src 'self' 'unsafe-inline';)

Public Key Pinning (HPKP) - I haven't set up this one yet but it's recommended for "serious" sites. It requires changing every time the SSL cert is updated.

And coming soon...

Expect-CT
9:48 am on June 6, 2018 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:July 7, 2003
posts:804
votes: 121


I was seeing google.es being blocked, so presumably that would also cause google.de etc to also be blocked. I think websites that rely on adsense should be very careful about implementing this, that's all.
1:38 am on June 7, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


- Summary of Security Headers -

Server - displays the software being run on the server but you can remove or change this value.

Content Security Policy - an effective measure to protect your site from XSS attacks. By whitelisting sources of approved content, you can prevent the browser from loading malicious assets.

Strict-Transport-Security - an excellent HTTP feature to support on your site and strengthens your implementation of TLS by getting the User Agent to enforce the use of HTTPS.

X-Frame-Options - tells the browser whether you want to allow your site to be framed or not. By preventing a browser from framing your site you can defend against attacks like clickjacking.

X-Content-Type-Options - stops a browser from trying to MIME-sniff the content type and forces it to stick with the declared content-type. The only valid value for this header is "X-Content-Type-Options: nosniff".

X-XSS-Protection - sets the configuration for the cross-site scripting filters built into most browsers. The best configuration is "X-XSS-Protection: 1; mode=block".

Referrer-Policy - a header that allows a site to control how much information the browser includes with navigations away from a document and should be set by all sites.

- - -
3:28 am on June 7, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


X-Permitted-Cross-Domain-Policies - when you don’t want to allow content producers to embed your work in their content, ensure you have no crossdomain.xml files within your website’s directory structure and use this header.
This 33 message thread spans 2 pages: 33