htaccess Force Require SSL

This will force SSL, and require the exact hostname or else it will redirect to the SSL version. Useful in a /wp-admin/.htaccess file.

Replace “” with your site name

SSLOptions +StrictRequire
SSLRequire %{HTTP_HOST} eq ""
ErrorDocument 403

Leave a Reply

Your email address will not be published. Required fields are marked *