We had been tinkering with using flexible SSL on WebTechGadgetry for a while. However, in the past, we had problems with setting up the HTTP to HTTPS redirect. Since then we figured out the problem and thought it a good start for a new post.

Lately, HTTPS has been quite a hot topic, with rumours going around suggesting Google are planning on adding it as part of their SEO ranking algorithms. Whether these claims are true it gave a good enough case to give Cloudflare’s flexible SSL another go.

Required Plugins

  • Cloudflare Flexible SSL (prevents the pesky redirect loop)
  • Cloudflare

Enable Cloudflare's flexible SSL for WordPress.The above plugins are required to set-up flexible SSL for WordPress correctly. The first thing to do before we go forward with anything else is to ensure all our WordPress blog’s assets are set-up to be downloaded through HTTPS. Without this, you’ll likely encounter insecure content warnings in your browser. To do this you must ensure HTTPS protocol rewriting is turned on from within the Cloudflare plugin settings.

Enabling Flexible SSL

Enabling SSL in the Cloudflare dashboard.The next step involves enabling flexible SSL within your CloudFlare control panel. This can be done by either changing the global SSL drop-down to flexible SSL or by doing it on a page rule basis. You should now find that you can now access your WordPress blog by using either HTTPS or HTTP. It’s best to stick with just one protocol to prevent duplicate content. Next we’ll be taking a look at how we redirect although HTTP to HTTPS with Cloudflare.

Redirecting HTTP to HTTPS

When we first tried switching over to HTTPS we attempted to set-up a redirect within our site’s .htaccess file. When doing so it resulted in some strange redirect behaviour that effectively broke the site. To remedy this we must create a separate page rule to exclusively redirect all requests to HTTPS.

Conclusion

This concludes our article on implementing and configuring flexible SSL with your WordPress website, we hope it helped you figure out the problems we had. HTTPS does allow the use of new technologies such as HTTP 2.0 and it would indeed seem as though the web is leaning towards improved security.

Find out more about the importance of SSL and the web, and why all sites not just ecommerce sites should now be using it.