Design N Rank · Quick guide

Host a client site on Cloudflare Pages — without moving their DNS

The domain's DNS stays on cPanel. Only the website moves to Cloudflare.

The short version

Why it works this way

Cloudflare Pages can serve a subdomain (like www) when the DNS lives somewhere else: you just point a CNAME at it. The bare domain (client.com) can only point at Pages if the whole DNS zone is on Cloudflare. We don't want that, so the bare domain stays on cPanel and redirects to www. Visitors and Google see one clean site at https://www.client.com.

Which sites to put on Cloudflare

Site typeHost it on
Static sites — plain HTML/CSS/JS, Astro, Next.js static export, AI-built landing pagesCloudflare Pages
WordPress, anything with PHP, a MySQL database, or server-side formscPanel (Pages can't run PHP)

Contact forms on a static site need a form service (or a Cloudflare Pages Function). Plan that before you move a site that has a form.

Before you start — checklist

Step-by-step

Part A — Put the site on Cloudflare Pages

  1. Log in to the Cloudflare dashboard. Go to Workers & Pages → Create → Pages.
  2. Choose Upload assets (drag in the site folder) or Connect to Git (the site redeploys on every push).
  3. Name the project after the client, e.g. acme-plumbing. Deploy.
  4. Open the acme-plumbing.pages.dev link and check the site works.

Part B — Connect www.client.com

  1. In the Pages project, open Custom domains → Set up a custom domain.
  2. Enter www.client.com and continue. Cloudflare shows a CNAME target — it is the project's .pages.dev address.
    Do this step first Add the domain in Pages before you change DNS, or the domain will not verify.
  3. In the client's cPanel → Zone Editor, find the existing www record (often a CNAME to client.com, or an A record). Edit it, don't add a second one:
    Name:   www.client.com.
    Type:   CNAME
    Record: acme-plumbing.pages.dev
    TTL:    300
  4. Back in Cloudflare, wait until the custom domain shows Active. Usually a few minutes; can take up to 24 h. Cloudflare issues the SSL certificate on its own.
  5. Open https://www.client.com — it should load the new site with a padlock.

Part C — Redirect the bare domain to www

The bare domain keeps its A record pointing at the cPanel server. Add a permanent redirect there.

  1. In cPanel, open File Manager, go to the domain's document root (usually public_html) and edit .htaccess (turn on "Show hidden files"). Add at the top:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^client\.com$ [NC]
    RewriteRule ^(.*)$ https://www.client.com/$1 [R=301,L]
    Replace client\.com and www.client.com with the real domain (keep the \. in the first one).
  2. Make sure the bare domain has a valid SSL certificate on cPanel (SSL/TLS Status → Run AutoSSL). Without it, https://client.com shows a warning before the redirect.
  3. Test all four — each must end on https://www.client.com:
    http://client.com
    https://client.com
    http://www.client.com
    https://www.client.com

No-code alternative: cPanel → Domains → Redirects, type Permanent (301), domain client.com, redirect to https://www.client.com/, and choose Do not redirect www.

Done. Email, MX, SPF/DKIM and every other record are untouched. The client's mail keeps working exactly as before.

Troubleshooting

SymptomFix
Custom domain stuck on "Pending" / "Verifying"Check the www CNAME is exactly the .pages.dev address and that there is no second www record (A or AAAA). Check CAA records. Then wait — DNS can take time.
Redirect loopThe .htaccess rule must match only the bare domain (^client\.com$), never www.
Padlock warning on https://client.comRun AutoSSL in cPanel for the bare domain.
AutoSSL reports an error for wwwExpected: www no longer points at cPanel, and Cloudflare covers it. You can exclude www in SSL/TLS Status to silence it.
Images or CSS missing on the live siteLook for links hard-coded to http:// or the old server path. Use relative paths.

Rollback

Set the www record in Zone Editor back to what it was (your screenshot) and remove the redirect from .htaccess. The old cPanel site is live again once DNS updates.

Doing this for many clients

Past roughly 20 sites, ask Shaw about Cloudflare for SaaS: each client still adds one www CNAME, but it points at a DNR-owned hostname, and all certificates are managed in one place.