I recently upgraded my site to SSL and I was wondering if I should force my traffic to HTTPS rather than leave access to HTTP?

If so how should I go about doing this on WordPress?

1 Answer 1


It is a good idea, but be warned, you may encounter many "mixed content" warnings where some content is loaded over http. This will happen with hard coded links to things like google fonts and images. If this happens, your page will be regarded as insecure.

Having said that, if you want to force to https add the following to your .htaccess file

RewriteEngine On
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
  • Thanks. Do i need to do anything on google webmaster tools like remove the http website properties? Or advise google to go to https?
    – Olly
    Jan 18, 2017 at 21:43
  • No idea, I don't use it
    – Steve
    Jan 18, 2017 at 21:52
  • 1
    You shouldn't get mixed content warnings if the site has been successfully "upgraded to SSL" - but obviously you need to test that HTTPS is working correctly before forcing this. The above redirect will need to go before any existing WordPress directives. (Surprising the number of users that put redirects at the end of their .htaccess file and still expect them to work!) The above redirect should ultimately be changed to a 301 (premanent) redirect after you've made sure it is working OK (ie. change R to R=301).
    – MrWhite
    Jan 19, 2017 at 10:53
  • On Google Search Console (formerly GWT) you need to verify the HTTPS property. You should still keep the HTTP property (don't delete it!) for reporting purposes.
    – MrWhite
    Jan 19, 2017 at 10:55
  • 1
    You should claim all versions of your site in Search Console. Both www and non-www for both http and https versions. Google will also begin indexing your https site even if you don't force the traffic with a redirect since it will prefer the secure version
    – brandozz
    Jan 19, 2017 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.