Step 2: Setting up SSL with Cloudflare

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 :grey:, 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 :ssl:)?

Yes

If your website already works over HTTPS, you can just set your SSL mode in Cloudflare to Full (strict)

And enable ‘Always Use HTTPS’ under |151px;x56px; if you want all visitors to go to the secure version of your site.
image

You should then move on to step 3 to enable the :orange: 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)

And enable ‘Always Use HTTPS’ under |151px;x56px; if you want all visitors to go to the secure version of your site.
image

You should then move on to step 3 to enable the :orange: 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 Screenshot%20from%202019-08-27%2013-47-34 tab of 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 |151px;x56px;.

You should then move on to step 3 to enable the :orange: and Cloudflare’s services on your site.


You can read more about the different SSL modes in this tutorial.


If you have completed this, it looks like you are ready to move on to Step 3: Enabling the 'Orange Cloud'!



This tutorial is one in the ‘Getting setup with Cloudflare’ series. They are listed below:



This is a Community Tutorial, most are wiki posts, so can be contributed to by Regulars and MVPs here, you can view all the community tutorials here. If there is a tutorial you would like to see, you can request one here.

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 that can help users with a similar issue.

We encourage users to check out these great resources and the Cloudflare Support Centre before posting

2 Likes