This tutorial is deprecated in favour of Get started with SSL/TLS · Cloudflare SSL/TLS docs
Archive
This tutorial covers getting SSL working with Cloudflare in various different scenarios.
This assumes you already have your website set up on Cloudflare with all your DNS records set to , if not - please visit Step 1.
Do you want the website to use HTTPS?
Yes
Do you already have a valid SSL certificate installed on your server (i.e. does it already load over HTTPS with a )?
Yes
If your website already works over HTTPS, you can just set your SSL mode in Cloudflare to Full (strict) in the app in your Cloudflare dashboard.
And enable ‘Always Use HTTPS’ under if you want all visitors to go to the secure version of your site.
You should then move on to step 3 to enable the and Cloudflare’s services on your site.
No
You should install a certificate on your server, you can get a free Cloudflare Origin Certificate, a free certificate from Let’s Encrypt, or one from your web hosting provider or another certificate authority.
You can then set your SSL mode in Cloudflare to Full (strict) in the app in your Cloudflare dashboard.
And enable ‘Always Use HTTPS’ under if you want all visitors to go to the secure version of your site.
You should then move on to step 3 to enable the and Cloudflare’s services on your site.
An alternative which is NOT RECOMMENDED, is to use Cloudflare’s Flexible SSL mode on your site without configuring a certificate. This can, however, cause issues and errors and is NOT SECURE! You can read Why flexible SSL mode is not the best choice
No
In the app in your Cloudflare dashboard, set your SSL mode to ‘Off’ and make sure there are no redirections to HTTPS on your server or in Cloudflare. Check your page rules and the ‘Always use HTTPS’ and ‘Automatic HTTPS Rewrites’ settings under
.
You should then move on to step 3 to enable the and Cloudflare’s services on your site.
You can read more about the different SSL modes in this tutorial.
Video - Introduction to SSL and Cloudflare’s Options
Credit to @albert for the fantastic explanation here.
https://www.youtube.com/watch?v=2PT3ZW3xglQ
If you have completed this, it looks like you are ready to move on to Deprecated - Step 3: Enabling the 'Orange Cloud'!
This tutorial is one in the ‘Getting setup with Cloudflare’ series. They are listed below:
- Deprecated - Step 1: Adding your domain to Cloudflare
- Deprecated - Step 2: Setting up SSL with Cloudflare
- Deprecated - Step 3: Enabling the 'Orange Cloud'
- Step 4: Checking your site after adding it to Cloudflare
Tutorial Reference: CT-02
Reviewed: 07/21
This is a Community Tutorial, most are wiki posts, so can be contributed to by Regulars and MVPs here. If there is a tutorial you would like to see, you can request one here.
If you would like to provide any feedback on this tutorial, please post in the #Meta category, tag your post #TutorialFeedback and let us know the Tutorial Reference above.
Other great resources on this community include the Community Tips . These address best practices when configuring Cloudflare, how to fix issues you may see, and tools to troubleshoot. Also you can view Expert Tips, great posts on the community from people in the know that may help you with your issue.
We encourage users to check out these great resources and the Cloudflare Support Centre before posting