Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Plugin how-tos · Guide

How to Set Cloudflare SSL Settings for WordPress

Short answer

Set Cloudflare SSL to Full (strict) after installing a valid certificate on your origin server, turn on Always Use HTTPS and Automatic HTTPS Rewrites, then change both WordPress addresses to https in Settings then General. Finish by setting minimum TLS 1.2, turning on TLS 1.3, and enabling HSTS once HTTPS works.

Key takeaways

  • Full (strict) encrypts both links, visitor to Cloudflare and Cloudflare to origin, and checks the origin certificate.
  • Universal SSL certificates last 90 days and auto-renew starting 30 days before expiry, as of November 2026.
  • Cloudflare Origin CA certificates last up to 15 years and work only with Cloudflare, not directly in browsers.
  • Always Use HTTPS redirects HTTP to HTTPS, while Automatic HTTPS Rewrites fixes HTTP resources inside page HTML.
  • Change both WordPress Address and Site Address to https, or WordPress keeps building HTTP links.
  • Start HSTS with a 6-month max age and raise it to 12 months only after HTTPS stays stable.

What are Cloudflare SSL settings for WordPress?

Cloudflare SSL settings control how traffic is encrypted between your visitors, Cloudflare, and your WordPress origin server.

Cloudflare describes two separate connections in its SSL setup: visitor to Cloudflare, and Cloudflare to your origin server. Both must be encrypted for end-to-end security, as explained in Cloudflare's guide to enforcing HTTPS.

The settings live in the Cloudflare dashboard under “SSL/TLS”, not inside WordPress. You change the encryption mode, edge certificate options, and redirect rules there, then match WordPress to HTTPS.

What do you need before you change anything?

You need an active Cloudflare zone, a proxied DNS record for your domain, and access to your WordPress dashboard and hosting account.

Check each item before you start, because a missing piece can leave your site unreachable.

  • Your domain is active on Cloudflare, with its nameservers pointing to Cloudflare.
  • Your main DNS record is proxied, shown by the orange cloud icon in Cloudflare DNS settings.
  • You can log in to WordPress as an administrator.
  • You have a backup of WordPress and a way to reach your host if the dashboard locks you out.

Allow about 30 to 60 minutes for the full change, plus waiting time for a new certificate. Most of that time is checking, not clicking settings.

Which Cloudflare encryption mode should you choose for WordPress?

Choose Full (strict) when your origin server has a valid SSL certificate, because it encrypts both connections and checks the origin certificate.

Cloudflare states that it strongly recommends Full or Full (strict) modes to prevent malicious connections to your origin, in its encryption modes documentation.

ModeVisitor to CloudflareCloudflare to originOrigin certificate check
OffNo encryptionNo encryptionNone
FlexibleHTTPSHTTP, no encryptionNone
FullHTTPSHTTPSNo check
Full (strict)HTTPSHTTPSYes, certificate checked
Strict (SSL-Only Origin Pull)HTTPSHTTPS alwaysYes, certificate checked

Flexible looks safe in a browser, because visitors still see a padlock. The link from Cloudflare to your origin stays in plain HTTP, so logins and form data travel unencrypted on that leg.

Full accepts a self-signed or expired origin certificate, so it encrypts the second leg without checking it. Full (strict) adds that check, and it accepts a certificate from a public authority such as Let's Encrypt or from Cloudflare Origin CA.

If your host already provides a free certificate, Full (strict) is the normal target for a WordPress site. If your origin has no certificate at all, install one first instead of settling for Flexible. The cost guide for how much an SSL certificate costs explains the free options many hosts include.

How do you set Cloudflare SSL to Full (strict)?

Install a valid certificate on your origin server first, then set the mode to Full (strict) in Cloudflare under “SSL/TLS” then “Overview”.

Cloudflare offers a free Origin CA certificate for this exact job. Its guide says Origin CA certificates are valid for up to 15 years and are trusted by Cloudflare, so you can set the mode to Full (strict) after installing one.

Step 1: Create an Origin CA certificate

  1. In the Cloudflare dashboard, open “SSL/TLS” then “Origin Server”.
  2. On the “Origin Certificates” tab, select “Create Certificate”.
  3. Choose “Generate private key and CSR with Cloudflare” and pick RSA or ECC.
  4. List the hostnames the certificate should cover, including wildcards if you use them.
  5. Choose a “Certificate Validity” period, then select “Create”.
  6. Copy the signed “Origin Certificate” and “Private Key” into separate files at once.

You cannot see the private key again after you leave that screen, so save it now. Keep both files private, as anyone with the private key can impersonate your origin to Cloudflare.

Step 2: Install the certificate on your origin

  1. Upload the Origin CA certificate to your origin web server.
  2. Update your web server setup to use the certificate.
  3. Upload the Cloudflare CA root certificate if your server asks for it.
  4. Enable SSL and port 443 at your origin web server.

Your host may have a one-click field for pasting a certificate and key in its control panel. If you are unsure where it goes, ask your host, because the exact menu varies by host.

An Origin CA certificate is trusted only by Cloudflare, not by browsers. That is fine here, because browsers see the Cloudflare edge certificate, not the origin one. Do not use an Origin CA certificate as the public certificate on a server that bypasses Cloudflare.

Step 3: Change the encryption mode

  1. In the Cloudflare dashboard, go to the “SSL/TLS Overview” page.
  2. Choose “Full (strict)” as the encryption mode.
  3. Load your site over HTTPS and check that pages open without a warning.

New zones use Automatic SSL/TLS by default. Cloudflare says this feature scans your origin about once a month and upgrades the mode in stages, starting with 1% of traffic and then rising in 10% increments until it reaches 100%.

If you prefer to control the mode yourself, switch to Custom SSL/TLS in the same “Overview” page. Automatic mode will not downgrade to a less secure mode if your origin certificate expires, according to Cloudflare's HTTPS guide.

How do you turn on Always Use HTTPS and Automatic HTTPS Rewrites?

Turn on Always Use HTTPS and Automatic HTTPS Rewrites on the “Edge Certificates” page so old HTTP links redirect and HTTP page resources are rewritten to HTTPS.

Always Use HTTPS redirects all HTTP requests to HTTPS before they reach your origin. Cloudflare notes that the option is not visible when the encryption mode is set to Off, so set a mode first.

  1. In the Cloudflare dashboard, go to the “SSL/TLS Overview” page.
  2. Confirm that your encryption mode is not set to “Off”.
  3. Go to the “Edge Certificates” page.
  4. Turn on “Always Use HTTPS”.
  5. On the same page, switch “Automatic HTTPS Rewrites” to “On”.

Automatic HTTPS Rewrites fixes mixed content by rewriting HTTP resource URLs in your page HTML to HTTPS. Cloudflare says it is useful when you do not control all asset URLs, such as content from a CMS or embedded third-party resources.

The rewrite only works when the HTTP resource is also available over HTTPS. Cloudflare checks each resource first, and it cannot rewrite a URL that has no HTTPS version, as stated in its Automatic HTTPS Rewrites documentation.

How do you set WordPress to HTTPS after Cloudflare is ready?

Change both the WordPress Address and the Site Address to https in “Settings” then “General”, then log in again at the HTTPS address.

WordPress builds links from those two addresses, so leaving either one on HTTP keeps parts of your site on HTTP. The Let's Encrypt vs paid SSL comparison covers which origin certificate type fits most sites.

  1. In WordPress, open “Settings” then “General”.
  2. Change “WordPress Address (URL)” from http to https.
  3. Change “Site Address (URL)” from http to https.
  4. Save your changes, then log in again at the https address.

Do this only after the HTTPS version of your site already loads without a warning. If the fields are greyed out, the addresses are set in wp-config.php, so change them there instead.

WordPress also supports forcing the admin area over SSL. Its HTTPS documentation says you can add this line to wp-config.php:

define( 'FORCE_SSL_ADMIN', true );

That constant forces all logins and all admin sessions to happen over SSL. WordPress notes that the older FORCE_SSL_LOGIN constant was deprecated in version 4.0, so use FORCE_SSL_ADMIN instead.

Behind Cloudflare, WordPress can fall into a redirect loop if it does not know the visitor used HTTPS. The same WordPress documentation explains that a reverse proxy that provides SSL can cause an infinite loop, and it shows how to check the HTTP_X_FORWARDED_PROTO header in wp-config.php.

How do you harden the setup with TLS 1.2, TLS 1.3, and HSTS?

Set the minimum TLS version to 1.2, turn on TLS 1.3, and then enable HSTS with a 6-month max age to start.

Cloudflare says TLS 1.0 and 1.1 have known vulnerabilities and are no longer considered secure. Setting the minimum to 1.2 blocks clients that use those older protocols.

  1. In the Cloudflare dashboard, go to the “Edge Certificates” page.
  2. For “Minimum TLS Version”, select “TLS 1.2”.
  3. For “TLS 1.3”, switch the toggle to “On”.
  4. For “HTTP Strict Transport Security (HSTS)”, select “Enable HSTS”.
  5. Read the dialog, select “I understand”, then select “Next”.
  6. Set “Max Age Header” to 6 months for the first period.
  7. Leave “Preload” off until the max age reaches 12 months and every subdomain works over HTTPS.
  8. Select “Save”.

HSTS adds a header that tells browsers to connect over HTTPS only, even if a link or redirect tries to send them over HTTP. Cloudflare says HSTS protects against protocol downgrade attacks, in its HSTS documentation.

Start with 6 months, as Cloudflare suggests, and raise it to 12 months after you confirm the site stays stable. The HSTS settings allow a max age from 1 to 12 months, or 0 to disable it.

Turn on “Apply HSTS policy to subdomains” only if every subdomain supports HTTPS. Subdomains without HTTPS become inaccessible when this is enabled, so check staging and mail subdomains first.

Preload is a stronger step. After you turn it on, submit your domain at hstspreload.org. Browsers that preload your domain will use HTTPS on the very first visit, before any header is seen.

How do you check that Cloudflare SSL works on WordPress?

Open the site in a fresh browser window, check the padlock, test an old HTTP link, and run an outside SSL test.

A padlock on the home page alone is not enough. Test the paths visitors and search engines actually use.

  • Open https://yourdomain.com and confirm the padlock shows with no warning.
  • Open http://yourdomain.com and confirm it redirects to the HTTPS version.
  • Open a post, a page, and the login page, and check each one for a padlock.
  • Open the browser developer tools, look at the console, and note any mixed content warnings.
  • Run your domain through the SSL Labs Server Test and look for an A or A+ grade.

Cloudflare says an A or A+ grade indicates that your TLS setup, certificate chain, and protocol support meet current security standards. That check runs from outside Cloudflare, so it tests what visitors actually see.

Also check the Cloudflare “Edge Certificates” page. A Universal SSL certificate for a full DNS setup should arrive within 15 minutes to 24 hours of domain activation, according to Cloudflare's Universal SSL documentation.

Universal SSL certificates have a 90-day validity period, and Cloudflare says auto renewal starts 30 days before expiry. The certificate covers the zone apex and all first-level subdomains, such as example.com and subdomain.example.com.

If a page still shows HTTP images after the change, the fix belongs in WordPress content, not in Cloudflare. Search and replace old http links in posts, widgets, and theme settings, then clear the cache.

How do you fix a redirect loop or mixed content warning?

Match Cloudflare and your origin so only one side redirects to HTTPS, then fix the remaining HTTP links in your content.

A redirect loop means the browser bounces between HTTP and HTTPS without ever loading the page. Cloudflare calls this error ERR_TOO_MANY_REDIRECTS, and its troubleshooting guide lists mode mismatches as the common cause.

  • If the mode is Flexible and your origin redirects HTTP to HTTPS, remove the origin redirect or move the mode to Full or higher.
  • If the mode is Full or Full (strict) and your origin redirects HTTPS to HTTP, remove that origin redirect.
  • If Always Use HTTPS is on and your origin redirects HTTPS to HTTP, remove the origin redirect or turn off Always Use HTTPS.
  • If HSTS is on and the mode is Off, set the mode to Flexible or higher, or turn off HSTS.

Check redirect rules too, because two rules that point at each other cause the same loop. Review them in Cloudflare under “Rules” and remove the conflicting one.

For mixed content, open the page, check the browser console, and note each HTTP URL it lists. Replace those URLs with HTTPS versions in WordPress, or let Automatic HTTPS Rewrites handle the ones that support HTTPS.

DNS changes can also delay the fix. If you just moved nameservers, wait for propagation before judging the result, as explained in the guide on how long DNS propagation takes.

What mistakes should you avoid?

Do not leave Flexible mode on a live site, do not turn on HSTS before HTTPS is stable, and do not change WordPress URLs before HTTPS loads.

Each of these mistakes is easy to make and slow to undo.

  • Staying on Flexible leaves the Cloudflare-to-origin link unencrypted, even though visitors see a padlock.
  • Turning on HSTS with preload too early can lock browsers into HTTPS before every subdomain is ready.
  • Changing WordPress addresses before the certificate works can lock you out of the dashboard.
  • Enabling “Apply HSTS policy to subdomains” when a subdomain has no HTTPS makes that subdomain inaccessible.
  • Pausing Cloudflare, switching DNS records to DNS only, or pointing nameservers away after enabling HSTS can block visitors, because browsers still expect HTTPS.
  • Forgetting to clear caches after the change can make a fixed page look broken for hours.

Google has treated HTTPS as a ranking signal since 2014, when it said the signal affected fewer than 1% of global queries at launch. Its HTTPS ranking announcement describes it as a lightweight signal, so fix SSL for security and trust first, not for a ranking jump.

Compare plans before you pay for extras. The Cloudflare Free vs Pro comparison shows which SSL features are included on the free plan, and most WordPress sites do not need a paid plan for the settings in this guide.

Frequently asked questions

What is the best Cloudflare SSL mode for WordPress?

Full (strict) is the best mode for most WordPress sites, because it encrypts the link from Cloudflare to your origin and checks the origin certificate. Use it when your origin has a valid certificate from a public authority or from Cloudflare Origin CA. Flexible leaves the second link unencrypted, so treat it as a temporary step only.

How long does Cloudflare Universal SSL take to activate?

For a full DNS setup, Cloudflare says a Universal SSL certificate should arrive within 15 minutes to 24 hours of domain activation, as of November 2026. The certificate covers the apex and first-level subdomains. If it stays pending past 24 hours, check that the zone is active and the DNS record is proxied.

Why does my WordPress site show a redirect loop after enabling Cloudflare SSL?

A loop usually means Cloudflare and your origin disagree about HTTP and HTTPS. Flexible mode plus an origin redirect to HTTPS is a common cause, as is Full mode plus an origin redirect back to HTTP. Remove the conflicting origin redirect or change the mode so both sides agree, then clear caches and test again.

Do I need to change anything in WordPress after setting up Cloudflare SSL?

Yes. Change both WordPress Address and Site Address to https in Settings then General, and add FORCE_SSL_ADMIN to wp-config.php if you want logins and admin sessions forced over SSL. Also replace old http links in posts, widgets, and theme settings, because Cloudflare rewrites cannot fix every stored link.

Should I turn on HSTS right away?

No, wait until HTTPS works on every page and subdomain you need. Start HSTS with a 6-month max age, confirm the site stays stable, then raise it to 12 months. Turn on preload only after the max age reaches 12 months and every subdomain supports HTTPS, because preload is hard to undo.

Is Cloudflare SSL free for WordPress?

Yes, Universal SSL is free on all Cloudflare plans, including the free plan, as of November 2026. Cloudflare issues and renews the edge certificate at no extra cost. You may still need a free origin certificate from your host or Cloudflare Origin CA to reach Full (strict) mode.

Sources

  1. Encryption modes Cloudflare Docs
  2. Enforce HTTPS and encrypt all traffic Cloudflare Docs
  3. Enable Universal SSL certificates Cloudflare Docs
  4. HTTP Strict Transport Security (HSTS) Cloudflare Docs
  5. Automatic HTTPS Rewrites Cloudflare Docs
  6. ERR_TOO_MANY_REDIRECTS Cloudflare Docs
  7. HTTPS WordPress Developer Resources
  8. HTTPS as a ranking signal Google Search Central Blog

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test