• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/
  • On Plesk for Linux mod_status is disabled on upgrades to improve Apache security.
    This is a one-time operation that occurs during an upgrade. You can manually enable mod_status later if needed.

Question Obtain status of HTST with SSL/It of domain via command line

Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
Plesk Obsidian 18.0.75
HI:

I want to check what domains have active HSTS, but the command of "plesk ext sslit", only active o disable the optionj, and i cant check if is enabled or not¿?

I have tried whit the command: grep -i strict-transport-security /var/www/vhosts/system/*/conf/nginx.conf and i see what is enabled, but not what is disabled

Somebody can help me¿?

Thanks!
 
To my knowledge there is no Plesk utility or build-in option to retrieve the HSTS status. I suspect that's because the status is only stored in the domain's nginx configuration. What you can do instead is use a bash/shell command to loop trough all domains and perform a grep search on the corresponding configuration file of the domain. Something like:

Code:
plesk bin domain -l | while read dom_name; do if ! grep -qi strict-transport-security /var/www/vhosts/system/$dom_name/conf/nginx.conf; then echo $dom_name; fi; done
 
Back
Top