joren
joren

Reputation: 1155

How to get a whole Wordpress site to work over SSL?

We have a Wordpress website that has an SSL certificate for all non-www pages. So, we've tried setting the Wordpress address URL to https://mydomain.com in the General Settings screen. The redirect works if you try entering www.mydomain.com, but only after you accept the certificate on the untrusted connection. So it needs to run the redirect before it checks. It also doesn't seem to redirect if no 's' is added to the http, but I've found plugins that say they'll fix that, but nothing seems to fix my other problem.

Upvotes: 0

Views: 954

Answers (1)

gearsdigital
gearsdigital

Reputation: 14205

Detailed explanation: http://noctis.de/archives/11-Using-WordPress-with-SSL.html :)

Maybe you need to add one more VirtualHost or to buy an wildcard certificate.

<VirtualHost my.ip:80>
    ServerName example.com
    ServerAlias www.example.com
    RedirectPermanent https://example.com
</VirtualHost>

Or try to add an .htaccess file:

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://example.com/$1 [R,L]

Source: http://www.besthostratings.com/articles/force-ssl-htaccess.html

Upvotes: 1

Related Questions