Image Image Image Image Image
Scroll to Top

To Top

General

08

Jun
2018

inGeneral

vonJohannes Hoppe

Quickpost: How to add SSL/TLS to WordPress via Cloudflare ☁️ for free

On 08, Jun 2018 | inGeneral | vonJohannes Hoppe

This is not a nice article as usually. But it should help! :-)

  1. wp-config.php change WP_HOME and WP_SITEURL to https://yourdomain. This example uses haushoppe-its.de
  2. Get an account at cloudflare. Add your domain to your account. The free plan is fine. Follow the instructions.
  3. Cloudflare wants you to change your nameserver. Cloudflare is super-cool, you won't regret this. Cloudflare wants elsa.ns.cloudflare.com and ken.ns.cloudflare.com.
  4. Pimp the DNS settings. If you want A records (no “www”), it looks like this. Take care about the proxy setting (orange cloud). You want this for your website, but you definitely do NOT want to break your database.
  5. Crypto Settings: Encrypt communication to and from your website using SSL. Choose Full SSL. Your origin supports HTTPS, but the certificate installed does not match your domain or is self-signed. Cloudflare will connect to your origin over HTTPS, but will not validate the certificate. Don't choose Flexible SSL. You will encounter a redirect loop.
  6. Scroll down. Always use HTTPS. Redirects all requests with scheme “http” to “https”. This applies to all http requests to the zone.
  7. That should be all. Wordpress will do a redirect from “www” to the main domain anyway. If not, see point 8.
  8. Optional Page Rule: if the URL matches www.haushoppe-its.de/* then Forwarding URL: (Status Code: 301 - Permanent Redirect, Url: https://haushoppe-its.de/$1)
  9. Enjoy your TLS: https://haushoppe-its.de screenshot2

Cheers! 🍺

Tags | , , ,