Skip to main content

Cloudflare DNS

Check whether you need this guide

If your domain was purchased from Alibaba Cloud, Tencent Cloud, Name.com, or another provider and DNS is still managed there, skip this guide and use Domain DNS Setup.

Continue only in either of these cases:

  • You purchased the domain from Cloudflare.
  • You purchased the domain elsewhere, but its DNS / nameservers are hosted by Cloudflare.

💡 In this guide, you will add the root redirect and www CNAME in Cloudflare, then check DNS / SSL in AllinCMS admin. Estimated time: 10 minutes.

Cloudflare's most common mistake is proxy status. The root domain and www need different settings. Finish the main setup first, then adjust advanced rules.

📺 Video: DNS Setup

📺 Video blank? Open it in a new tab.

Overview

1Copy CNAME
2Add root A
3Add www CNAME
4Redirect root
5Refresh admin

1. Copy Target

In AllinCMS admin, open Domains and copy the generated CNAME target.

AllinCMS admin domain page - open Domains in the sidebar and copy the generated CNAME target before pasting it into Cloudflare DNS

If you are not sure where the CNAME is, read the "Get Target" section in DNS Setup.

2. Root A

In Cloudflare, open your domain, go to DNS -> Records, and click Add record.

For the root domain record:

FieldValue
TypeA
Name@
IPv4 address8.8.8.8
Proxy statusProxied
TTLAuto

This A record is mainly used to redirect the root domain to www. Do not treat it as the actual server address for the AllinCMS site.

Cloudflare add A record - the DNS form contains type A, name @, IPv4 address 8.8.8.8, and proxied status for root-domain redirect

3. www CNAME

Add a CNAME record:

FieldValue
TypeCNAME
Namewww
TargetPaste the AllinCMS admin CNAME target
Proxy statusDisabled, DNS only
TTLAuto
If Cloudflare says the record already exists

Before adding the www CNAME, check whether Cloudflare already has a record with the same name.
If you see A CNAME record with that host already exists, the www host already has a CNAME or A record.

Use one of these fixes:

  • If you do not need the old record, delete the existing www record and add the CNAME again.
  • If you need to keep the same host, edit the old record, change the type to CNAME, and replace the target with the AllinCMS admin CNAME target.

Do not keep two records with the same www name.

Cloudflare CNAME conflict error - Cloudflare says the same CNAME host already exists, so the old record must be deleted or replaced before saving

Then fill the CNAME like this. The three key fields are: choose CNAME, enter www, and paste the AllinCMS admin CNAME target. Keep proxy disabled so it shows DNS only.

Cloudflare CNAME target example - the record type is CNAME, name is www, target is copied from AllinCMS admin, and proxy is disabled

After saving, the DNS list should contain two key records: the root A record and the www CNAME record.

Cloudflare DNS record list - root A record and www CNAME record exist together to complete DNS setup for the AllinCMS site

Keep www DNS only first

Keep the www CNAME proxy disabled first, so AllinCMS admin can verify DNS and SSL. The cloud should be gray and show DNS only.

4. Redirect www

If you want example.com to redirect to www.example.com, create a page rule or redirect rule in Cloudflare.

Example:

URL: example.com/*
Setting: Forwarding URL
Status code: 301 permanent redirect
Target: https://www.example.com/$1

Replace example.com with your real domain.

Cloudflare page rule entry - the rules page creates a page rule used to redirect the root domain to the www domain

Cloudflare 301 redirect setting - the URL matches the root domain and forwards to the https www domain for a unified website entry

5. Refresh Admin

For Cloudflare, AllinCMS admin usually only needs the www domain added and selected as the primary domain. After DNS records are saved, return to Domains and refresh.

AllinCMS admin Cloudflare domain verification - the domain list selects www as primary and refreshes verification to confirm SSL and DNS status

If SSL fails, wait 10 to 30 minutes and refresh again.

Pitfalls

MistakeResultHow to avoid it
🔴 Proxy enabled on www CNAMEAllinCMS admin verification may failUse DNS only first
🟡 Root domain not redirectedRoot domain may not openAdd 301 redirect to www
🔴 Adding https:// before CNAME targetDNS does not passEnter the plain domain only
🟡 Judging right after savingFalse failureWait 10 to 30 minutes

Next