WebGee DocsDocs
Domains & DNS

Put your site behind Cloudflare

Move your domain's DNS to Cloudflare, choose the right SSL mode, and avoid the redirect loop and email problems that catch people out.

Route your site through Cloudflare for caching, DDoS protection and a global CDN. Applies to any domain, on any WebGee plan.

Cloudflare works by becoming your domain's DNS provider, so traffic reaches Cloudflare first and Cloudflare fetches from WebGee.

Add your domain

  1. Create an account at cloudflare.com and verify your email address.
  2. Select Add a Site and enter your domain.
  3. Cloudflare scans your existing DNS records. Check this list carefully before continuing — anything it misses stops working when you switch.

Pay particular attention to MX records. If your email is hosted with WebGee and the MX records do not carry across, mail stops being delivered the moment the nameservers change. Compare the imported list against cPanel → Zone Editor before you proceed.

Change your nameservers

  1. Note the two nameservers Cloudflare gives you.
  2. Sign in wherever your domain is registered.
  3. Replace the existing nameservers with Cloudflare's.

If the domain is registered with WebGee, see Update your domain's nameservers.

Propagation typically takes a few hours, though it can take up to 24.

Set the SSL mode correctly

This is the step that causes the most problems, and Cloudflare's default is not the right answer.

  1. In Cloudflare, go to SSL/TLS.
  2. Set the encryption mode to Full (strict).

Do not use Flexible. It makes Cloudflare fetch your site over plain HTTP while telling visitors the connection is secure. If you have also forced HTTPS on the server, the result is an infinite redirect loop — see Force HTTPS on your site.

Full (strict) requires a valid certificate on the WebGee side, which AutoSSL gives you: Install a free SSL certificate.

Check it worked

dig +short NS example.com

The response should list Cloudflare's nameservers. Then confirm traffic is actually passing through:

curl -sI https://example.com | grep -i "server\|cf-ray"

A cf-ray header means the request went through Cloudflare.

Things that change once you are behind Cloudflare

  • Visitor IPs in your logs become Cloudflare's, unless you restore the original — Cloudflare sends it in the CF-Connecting-IP header.
  • AutoSSL validation can fail while a record is proxied, because Cloudflare intercepts the validation request. Set the record to DNS only (grey cloud) temporarily if a certificate will not issue.
  • Mail records must stay unproxied. Cloudflare cannot proxy SMTP, so MX records and the mail. hostname must be set to DNS only (grey cloud). Proxying them stops mail delivery. See Spam and virus filtering.

On this page