#https
5 one-liners with this tag.
All one-liners tagged https
Check the SSL certificate expiration date of a website
$openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -dates
Check whether a website sends the HSTS header
$curl -sI https://example.com/ | grep -i "^strict-transport-security"
Find mixed content in the HTML of an HTTPS page
$curl -s https://example.com/ | tr '\n' ' ' | grep -oiE '(src|srcset|data-src)="http://[^"]+"|<link[^>]+href="http://[^"]+"|url\(.?http://[^)]+\)' | sort -u
Switch the WordPress database from http to https
$wp db export /var/www/vhosts/example.com/before-https.sql --path=/var/www/vhosts/example.com/httpdocs && wp search-replace 'http://example.com' 'https://example.com' --skip-columns=guid --path=/var/www/vhosts/example.com/httpdocs
Test http, https, www and non-www at once
$for u in http://example.com/ http://www.example.com/ https://example.com/ https://www.example.com/; do curl -s -o /dev/null -m 10 -w "%{http_code} $u -> %{redirect_url}\n" "$u"; done