Habilitar HSTS en Plesk

Habilitar HSTS en plesk

En la interfaz de Plesk, ene Configuración de Apache y nginx:

add_header Strict-Transport-Security “max-age=31536000; includeSubDomains; preload” always;
gzip on;
gzip_disable “MSIE [1-6]\\.(?!.*SV1)”;
gzip_proxied any;
gzip_comp_level 5;
gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml;
gzip_vary on;

 

Habilitar HSTS en plesk

Tener habilidado HSTS mejora el SEO de nuestra página web

Creamos

.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Header always set Strict-Transport-Security “max-age=31536000; includeSubDomains; preload”
</IfModule>

Probamos en: https://www.ssllabs.com/ssltest/analyze.html?d=domain.com

Luego https://hstspreload.appspot.com/

https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security4

 

 

 [:en]Habilitar HSTS en plesk

Tener habilidado HSTS mejora el SEO de nuestra página web

Creamos

.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Header always set Strict-Transport-Security “max-age=31536000; includeSubDomains; preload”
</IfModule>

Probamos en: https://www.ssllabs.com/ssltest/analyze.html?d=domain.com

Luego https://hstspreload.appspot.com/

https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security4