Using SSL with WP Rocket

If use SSL on your website, make sure to take the following steps to ensure that it works correctly with WP Rocket.

Note: We provide this info as a helpful, informational guide for you; we don’t provide support for the third-party plugins mentioned!

1

Change your site settings to HTTPS

Go to Settings → General and make sure these fields include HTTPS in your website address:

General Settings page in WP Admin

2

Make sure all assets use HTTPS

Changing your site settings will take care of a lot of the work here, but you may still have some other links to assets that still use HTTP. These all need to be changed to HTTPS to avoid  “Mixed Content” warnings and other issues. Rather than doing it manually, you can use one of the following methods: 

If you are a developer, we recommend Interconnectit’s Search and Replace script.

If you prefer a plugin-based method, try any one of these plugins:

3

Redirect all HTTP traffic to HTTPS

Follow this tutorial for guidance:
Redirect HTTP to HTTPS

Alternatively you may also find this plugin useful to manage the redirect and also help fix insecure content problems:
Really Simple SSL

Using a CDN with SSL

When you have an SSL site and you have a CDN, your CDN must also be SSL-enabled, otherwise it will cause problems such as CSS and other files not loading, because the browser will block them.

If you activate the CDN option on your SSL site and have an issue, you can check if your CDN has SSL enabled with this simple test:
Visit your CDN URL in your browser. If you get a security warning like the one depicted below, it means SSL is not enabled on your CDN:

Privacy warning message

The solution is to contact your CDN provider and ask them to enable SSL on your account.

Using Cloudflare’s Flexible SSL

Cloudflare’s Flexible SSL is not very WordPress-friendly and can cause issues. These are common ones:

1

Resolving a redirect loop

A common problem when using WordPress and Cloudflare’s Flexible SSL is getting a redirect loop. You can fix this using this plugin:
Cloudflare Flexible SSL

2

Cloudflare-specific redirect

For redirecting non-HTTPS traffic, use this Cloudflare-specific rewrite rule in your .htaccess file:

RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"'
RewriteRule ^(.*)$ https://www.example.com/$1 [L]

Heads up! Make sure to replace https://www.example.com with your own domain name.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.