Skip to content

How to Connect a Domain Through Cloudflare to Cloudways (with Origin Certificate): 2026 Guide

On this page

Last updated: · By

Short answer: connecting Cloudflare to a site on Cloudways takes three steps. You add the domain to your Cloudflare account and create an A record pointing to the server’s IP address, you switch the nameservers at your domain registrar, and you add the domain to the application in the Cloudways panel and set it as primary. To keep the connection encrypted all the way to the server, install an SSL certificate on the server (Let’s Encrypt or a Cloudflare Origin Certificate) and set Cloudflare to Full (strict). The work itself takes about half an hour, and the nameserver change can take up to 24 hours to spread.

⏱ Time needed: 30–45 minutes of work + up to 24 hours for DNS to update · Difficulty: medium · Last checked against the official documentation: 6 Nov 2026

What Cloudflare does for your site, and why connect it

Cloudflare is a service that sits between your visitors and your server. Once your domain goes through it, every request hits Cloudflare’s network first and only then reaches your server on Cloudways. In this setup your server is called the origin.

What do you get out of it? Three main things. Fast, convenient DNS management, where a record change takes effect within minutes. A protection layer that filters malicious traffic and DDoS attacks before they reach your server. And a CDN, meaning static files (images, CSS, JavaScript) are cached on Cloudflare’s servers around the world, so they load faster and take load off your server.

Cloudflare has a free plan, and for most sites it is enough. I connect most of the sites I manage through it, mainly for the DNS convenience: you don’t wait hours on your registrar every time you add a verification record for Google Search Console or an email service. And if you are weighing DNS management from inside the Cloudways panel instead, see DNS Made Easy vs Cloudflare DNS.

The downside you should know about: once your site runs through Cloudflare, its availability depends on them too. If Cloudflare has an outage, your site can be affected as well. It is rare, but it happens.

What are the three ways to connect Cloudflare to Cloudways?

Before you start, decide which route you are taking. This guide focuses on the first two, which use your own Cloudflare account.

RouteWhat you doWhen to choose itCost
Free Cloudflare + Let’s Encrypt on the serverSwitch nameservers, install Let’s Encrypt from the Cloudways panel, use Full (strict) modeMost sites. The easiest to maintainFree
Free Cloudflare + Origin CertificateSame as above, but you install a certificate issued by Cloudflare on the server and enable Authenticated Origin PullsWhen you want only Cloudflare to be able to reach the server over HTTPS, and a certificate you don’t have to renew every few monthsFree
Cloudways Cloudflare Enterprise add-onEnable it from the panel and add a CNAME record. No Cloudflare account and no nameserver changeStores and sites with serious traffic that want Enterprise features managed by CloudwaysFrom $4.99 per domain per month (as of Nov 2026)

I wrote a separate guide on the third route, including pricing and the trial period: Cloudways and Cloudflare Enterprise. If you have enabled it, you don’t need this guide, and you don’t need an Origin Certificate.

What do you need to prepare before you start?

  • A registered, active domain, and access to your account at the domain registrar (GoDaddy, Namecheap, etc.).
  • An application on Cloudways that already hosts your site. You’ll find the server’s IP address on the server page, under Master Credentials.
  • A screenshot of your existing DNS records, especially the MX and TXT records for email. This is the easiest thing to forget, and it’s the one that takes a business’s email down.
  • A fresh backup of the application, in case something goes wrong with the redirect settings. See the backup and restore guide.

Step 1: Add your site to Cloudflare

In this step you open an account and set up the records in Cloudflare that will point to your server on Cloudways.

  1. Go to cloudflare.com and create an account with an email address and password.
  2. Add your site (Add a Site), type the domain without www, for example example.com, and start the scan (Begin Scan). The scan takes about a minute; when it finishes, click Continue.
  3. Choose a plan. For most sites the Free plan is enough.
  1. Cloudflare shows the DNS records it found. Make sure the two basic records exist, and fix them if needed:
    A record: in the Name field, the domain itself (or @); in the Content field, the IP address of your server on Cloudways.
    CNAME record: in the Name field www; in the Content field, the domain itself.
  2. Check that your email records (MX, and TXT records such as SPF) were copied as they are. If a record is missing, add it manually from the screenshot you saved.
The Master Credentials screen with the IP address, username and password (hidden) and the SSH Public Keys button
The server’s master access details (SFTP and SSH)

The orange cloud and the grey cloud. Next to each record there is a cloud icon. An orange cloud (Proxied) means traffic goes through Cloudflare, with the protection and the CDN. A grey cloud (DNS only) means Cloudflare only manages the record and visitors reach the server directly. For the site itself (the domain and www) leave it orange. For email records, and for any service that isn’t a website, leave it grey.

Step 2: Change the nameservers at your domain registrar

At the end of the setup, Cloudflare gives you two nameservers assigned to your domain. You can also find them later on the domain’s Overview screen in Cloudflare.

  1. Copy the two nameservers Cloudflare showed you.
  2. Log in to your account at the domain registrar and open the domain’s nameserver settings (at most registrars this is in the domain management or DNS area).
  3. Delete the existing nameservers, paste the Cloudflare ones in their place, and save.
  1. Go back to Cloudflare and ask it to check the nameservers. When the change is complete you’ll get an email, and the main screen will show the domain as active.

How long does it take? In my experience, usually up to 24 hours, and sometimes longer. Along the way there will be moments when it looks like everything switched, and then another computer still shows the old state. That’s normal. Until the change has spread, don’t edit the old records at the registrar.

Country-code domains (such as co.uk, com.au or co.il) go through the registry of that country, so the switch is sometimes slower than with a .com domain. For hardening the domain itself, such as DNSSEC and HSTS, see securing a country-code domain with Cloudflare. If you have a country-code domain, it is also worth reading the guide to connecting a country-code domain and DNS.

Step 3: Add the domain to the application on Cloudways

Now you need to tell the server on Cloudways that this domain belongs to your application. You can do this even before the nameserver change has finished.

  1. In the management panel, select the server and the application.
  2. Under Application Management, open Domain Management.
  3. Click Add Domain, type the domain without https:// and save.
  4. Next to the domain you added, open the three-dot menu and choose Make Primary to set it as the primary domain.
The application's domain list with the primary domain
Domain Management

For a full explanation of primary and additional domains, including what happens on an Autonomous server, see the guide to connecting a domain to Cloudways.

Step 4: How do you set up SSL and full encryption to the server?

This is the step most guides skip, and it is the main source of problems. With Cloudflare there are two legs of the connection: from the visitor to Cloudflare, and from Cloudflare to your server. Cloudflare encrypts the first leg on its own. The second leg is encrypted only if there is an SSL certificate on the server.

The setting that decides how Cloudflare connects to your server is in Cloudflare under SSL/TLS. These are the modes that matter to you:

Mode in CloudflareWhat happens between Cloudflare and the serverRecommendation
FlexibleNot encrypted. If an HTTPS redirect is enabled on Cloudways, you get a redirect loopDon’t use it with your own Cloudflare account
FullEncrypted, with no check that the certificate on the server is validAn interim step only
Full (strict)Encrypted, and Cloudflare checks that the certificate on the server is validThe recommended mode, with Let’s Encrypt or an Origin Certificate

Option A: Let’s Encrypt from the Cloudways panel

This is the simple way. You install the free certificate from the panel, and it renews automatically. According to the Cloudways documentation, when the domain is already behind Cloudflare you may need to temporarily pause Cloudflare’s protection (or switch the records to a grey cloud) until the certificate is installed, and then clear the Cloudflare cache after the installation. After that you switch to Full (strict). I covered the whole process in the SSL certificate installation guide.

Option B: Cloudflare Origin Certificate

An Origin Certificate is a free certificate that Cloudflare issues specifically for the connection between it and your server. You can set its validity to up to 15 years, so there are no renewals. The important catch: only Cloudflare trusts it. A browser that reaches the server directly will show a security warning.

  1. In Cloudflare, select your domain, go to SSL/TLS and set the mode to Full for now.
  2. Go to the Origin Server tab and click Create Certificate.
  3. Choose how the private key is generated. The Cloudways documentation describes creating a CSR in an external tool and selecting I have my own private key and CSR. You can also let Cloudflare generate the key itself, which saves you from pasting a private key into a third-party site.
  4. Make sure the hostname list includes both the domain and the www version (or a wildcard for all subdomains), choose a validity period and click Next.
  5. Copy the certificate, and the private key if Cloudflare generated it. Store the key somewhere safe: once you close the window you won’t be able to see it again.
  1. In the Cloudways panel, inside the application, go to Application Management and choose SSL Certificate.
  2. In the dropdown choose Upload Custom SSL and Key file(s) and click Install SSL.
  3. Paste the certificate into the certificate content field (CRT) and the private key into the key field (KEY), including the BEGIN and END lines, then click Submit. The installation takes a few minutes.
SSL certificate management (Let's Encrypt) with automatic renewal
The site’s SSL certificate
  1. When Cloudways offers to enable an HTTPS redirect, decide based on what already exists. If the redirect is already set up in Cloudflare or in a plugin, click Not Now. Two redirects at the same time are a recipe for a loop.
  2. Go back to Cloudflare, to the same area where you created the certificate, and enable Authenticated Origin Pulls.
  3. Go to the Overview tab of SSL/TLS and choose Full (strict).

What is Authenticated Origin Pulls? When the setting is on, Cloudflare presents an identity certificate to your server on every connection. That way the server knows the request really came from Cloudflare and not from someone trying to bypass the firewall and hit the IP directly. It is especially useful if you rely on Cloudflare’s WAF rules.

One thing to remember: an application can have only one active SSL certificate. Installing an Origin Certificate replaces an existing Let’s Encrypt one. And if you later stop using Cloudflare or switch the records to a grey cloud, the site will show a security warning until you install Let’s Encrypt in its place.

Black Friday80% off
80% off 2 months of managed hosting

The code BFCM802 takes 80% off your bill for the first two months (up to $200 off per month), including unlimited free site migrations. New customers only, and only until the offer ends.

The offer ends on December 4, 2026 at 23:59 (UTC+2).

Ends in—days—hours—minutes—seconds
Code:
Grab the 80% now

Start with a free trial, no credit card. Enter the code at checkout and check that it shows up.

After Black Friday: 30% off for 3 months with the code ASAEL. On a large server (above about $444 a month) ASAEL already saves more today. BFCM802 vs. ASAEL calculator

Which settings should you check after connecting?

  • Breeze cache. According to Cloudways, Cloudflare works with the Breeze plugin without extra configuration. After enabling it, purge the Breeze cache and leave automatic purging on, so the two caches stay in sync.
  • An HTTPS redirect in one place only. Choose whether the redirect lives in Cloudflare, in Cloudways or in a plugin, and turn off the others. See the HTTP to HTTPS redirect guide.
  • Cloudflare optimizations. In the original version of this guide I recommended turning on all the optimizations. Today I’m more careful: some of the older options no longer exist, and options that modify JavaScript (like Rocket Loader) can break menus, forms and checkout. Turn them on one at a time and test the site.
  • CDN. What Cloudflare’s cache stores and how it works together with the server cache is explained in the Cloudflare CDN guide.

Common mistakes and how to fix them

ERR_TOO_MANY_REDIRECTS (a redirect loop): almost always it’s Flexible mode in Cloudflare combined with an HTTPS redirect on Cloudways, or two redirects running at the same time. Install a certificate on the server, switch to Full (strict) and keep the redirect in one place. Errors 521, 522 and 525 are a different story, explained in the Cloudflare 5xx errors guide.

Business email stopped working after the switch: the MX records weren’t copied to Cloudflare, or the mail server’s record was set to an orange cloud. Fill in the records from the screenshot you saved, and keep email records on a grey cloud.

A browser security warning after pausing Cloudflare: this is expected if you installed an Origin Certificate, because only Cloudflare trusts it. Turn the orange cloud back on, or install Let’s Encrypt from the panel.

The Let’s Encrypt installation fails: if the domain goes through Cloudflare, temporarily pause the protection or switch the site’s records to a grey cloud, install the certificate, then switch back. Also check that the A record points to the correct IP address of the server.

You want to test the server without Cloudflare: Cloudways recommends temporarily editing the hosts file on your computer so the domain points straight to the server’s IP. That way you test the server without touching DNS for everyone else.

Sources

The official sources this page is based on (checked on 7 Nov 2026):

Frequently asked questions about connecting Cloudflare

Does connecting Cloudflare to Cloudways cost money?

Not necessarily. Cloudflare’s free plan is enough for most sites, and both Let’s Encrypt and Origin Certificate are free. You only pay if you choose a paid Cloudflare plan or the Cloudways Cloudflare Enterprise add-on.

How long does it take until the site works through Cloudflare?

The setup itself takes about half an hour. The nameserver change at the registrar usually updates within 24 hours, sometimes longer. During that time the site keeps working, because both sets of addresses point to the same server.

Which SSL mode should I choose in Cloudflare when my site is on Cloudways?

Full (strict), after you’ve installed a certificate on the server: Let’s Encrypt from the panel or a Cloudflare Origin Certificate. Flexible mode doesn’t encrypt the leg between Cloudflare and the server and often causes redirect loops.

Can I use Cloudflare without changing nameservers?

With a regular Cloudflare account on the free plan you have to change nameservers. The Cloudways Cloudflare Enterprise add-on works with a CNAME record, so DNS stays with your current provider.

Do I also need an Origin Certificate if I enabled Cloudflare Enterprise on Cloudways?

No. According to Cloudways, when the Cloudflare Enterprise add-on is active, encryption is handled through it and you don’t need an Origin certificate. This guide is for people connecting their own Cloudflare account.

Does Cloudflare slow down a site hosted on Cloudways?

Usually not, and most of the time it speeds the site up thanks to the CDN for static files. Slowdowns come mainly from wrong settings, like a cache that doesn’t get purged or JavaScript optimizations that clash with the site.

Official source: How to Configure Cloudflare Origin Certificate, How to Use Cloudflare CDN on Cloudways, How to Enable Cloudflare on Your Application (Cloudways Knowledge Base). This guide was written and tested by Asael Dreyer · Updated: 6 Nov 2026

Disclosure: this is an independent site, not the official Cloudways site. Some links on this site are affiliate links: if you sign up through them we earn a commission, at no extra cost to you. Full details

Picture of Asael Dreyer
Asael Dreyer

Hi, I'm Asael Dreyer, CEO of an SEO agency that runs hundreds of websites hosted on dozens of Cloudways servers.
Everything you will find here comes from hands-on experience, mine and my teams', straight from the field: from the guides to the recommendations. All to help you get the most out of Cloudways.

More about me →

Need help? Got a question about your server or this guide? Write to us and we will get back to you.

More guides on this topic:
מפריד
Thanks for your message!
We will get back to you soon.
Ready to get started?

Sign up with the coupon code ASAEL