عربي
News
●E-invoicing: the last date to connect for wave 25 is February 1, 2027●WhatsApp Business: service messages are paid after 1,000 free per month●Salla acquires Paylink to strengthen payment solutions for merchants●Google launches a Gemini agent for businesses first, then consumers●Hostinger's White Friday deals continue until December 14

Connect your domain to Cloudflare and get free SSL and a CDN

You will add your domain to Cloudflare and change the nameservers, then set the encryption mode and force HTTPS so your site gets a free SSL certificate and CDN.

The problem

Your site opens over HTTP only, or the browser shows a "Not secure" warning. Visitors hesitate, and Google does not favor such a site. Some hosts also charge a yearly fee for an SSL certificate, and your site loads slowly for a visitor far from your server. A common fix is to put the domain behind a service that secures the connection and caches copies of your pages close to the visitor.

The tool

Cloudflare is a service that sits between your visitors and your server. According to the official plans page, the Free plan at $0 per month includes a CDN, a Universal SSL certificate and unmetered DDoS protection. And according to Cloudflare's docs, Universal certificates are issued and renewed for free for domains added to and activated on Cloudflare. The steps below come from the official docs, and button names are written as they appear in the English interface.

The steps

  1. Create a Cloudflare account and log in to the dashboard.
  2. Go to Domains, then choose Onboard a domain.
  3. Enter your apex domain without www (for example example.com), choose how to add your DNS records, then click Continue.
  4. Choose the plan. To start, the Free option is enough.
  5. Review the DNS records Cloudflare shows. Check the records for the apex domain and subdomains such as www, and the email records, and add any missing record by hand. For each A, AAAA or CNAME record set the proxy status as you want, then click Continue.
  6. Update the nameservers. Cloudflare gives you two. Go to your domain registrar's panel and put them in place of the current ones. If your domain uses DNSSEC, turn it off at the registrar before changing nameservers, otherwise the domain may become unreachable, according to the docs.
  7. Wait for Cloudflare to activate your domain. According to the docs, Cloudflare services start protecting and speeding up traffic after the nameserver update and once records are proxied. The docs do not give a fixed waiting time.
  8. Go to SSL/TLS, then the Overview page, and choose the encryption mode. According to the docs: Flexible encrypts the connection between the visitor and Cloudflare only, while the connection between Cloudflare and your server stays unencrypted. Cloudflare recommends Full or Full (strict) where possible. Full (strict) validates your server's certificate, and accepts one from a public CA such as Let's Encrypt or the free Cloudflare Origin CA certificate.
  9. Turn on Always Use HTTPS to redirect visitors to HTTPS, and turn on Automatic HTTPS Rewrites to avoid mixed content errors. The docs say that before enabling them you should confirm you have an active edge certificate and that the SSL mode is not Off. Look for the two options under SSL/TLS, then Edge Certificates; the section name may differ in your interface.
  10. Open your site with https:// and check that the padlock appears and that pages and images load without warnings.

The real cost

The Free plan is $0 per month according to the official pricing page at the time this guide was written. The Pro plan is $20 per month billed annually or $25 per month billed monthly. The page writes the $ sign without naming the currency, so check it before paying. This does not include the price of the domain itself or of hosting.

The free alternative

If your host offers a free one-click Let's Encrypt certificate, it may be enough to get HTTPS without changing nameservers. But you will not get Cloudflare's CDN.

Notes

  • We have not tried these steps ourselves yet; they are based on the current official docs. Button names may change, so if your interface differs, follow the docs.
  • Write your current DNS records down in a file before changing the nameservers, because one missing record (such as an email record) can stop a service.
  • If your server does not support HTTPS, Full (strict) will not work. Set up the certificate on the server first.
  • Changing nameservers affects everything tied to the domain, including email.

Sources

  1. developers.cloudflare.com
  2. developers.cloudflare.com
  3. developers.cloudflare.com
  4. developers.cloudflare.com
  5. cloudflare.com

Did you like this guide?

The weekly newsletter is being prepared. Leave your email and we'll send it when it launches.

We use your email only to send the newsletter. Privacy policy