HTTP Strict-Transport-Security (HSTS)
Marc Wagner
July 16, 2022
HSTS stands for HTTP Strict Transport Security. It is a header specification that tells the browser of the page visitor that for a specified period of time (max-age), communication should take place exclusively via a secure connection (HTTPS).
How to enable the HSTS header on Plesk for Linux #
- Sign in to Plesk.
- Go to Websites & Domains > Hosting Settings and enable the “Permanent SEO-safe 301 redirect from HTTP to HTTPS” option there.
- Then go to Websites & Domains > Apache & nginx settings.
- Now enter the following there and save the changes afterwards.
- Apache, additional instructions for HTTPS:
add_header Header always set Strict-Transport-Security “max-age=31536000” - Additional nginx directives:
add_header Strict-Transport-Security “max-age=31536000” always;
- Apache, additional instructions for HTTPS:
That was it already. You have activated the HSTS header for your domain.
Artikel von:
Marc Wagner
Hi Marc here. I’m the founder of Forge12 Interactive and have been passionate about building websites, online stores, applications and SaaS solutions for businesses for over 20 years. Before founding the company, I already worked in publicly listed companies and acquired all kinds of knowledge. Now I want to pass this knowledge on to my customers.