Whilst using Webpagetest’s website, I noticed they have added a new metric of “Security Score” when you run a test. When I first discovered this, I couldn’t believe I was getting a red and a big fat “F” for my webpage security score:
How To Fix Webpagetest Security Score
However, the really handy thing Webpagetest have done is to allow you to click on the “F” grade, which opens up a new window and shows you step by step what you need to add to your .htaccess file to achieve a green “A” grade instead.
I went through all of the details and then updated my .htaccess file and got a nice green “A”!
Just to make it a bit easier for you, I have shown below the code you need to add to your .htaccess file at the bottom, but please do take a backup of your website first before making any changes and if you do not know what you are doing, then get someone who knows what they are doing to do it for you. Get in touch with me if you need any help with this: