How-To

SendLayer CNAME authentication error in Cloudflare: fix

The "authentication error" when adding a SendLayer CNAME in Cloudflare usually means the login, API token or role making the change lacks permission to edit DNS on that zone. Add the record by hand in the right account, set to DNS only, then verify it with dig.

Sohail HussainSohail Hussain10 min read

Short answer

  • The error most likely means the Cloudflare login, role or API token making the change is not allowed to edit DNS for that zone, so nothing was saved.
  • Sign in to the Cloudflare account that owns the domain with a role that can edit DNS, then add each CNAME by hand under DNS, Records, with Proxy status set to DNS only.
  • Check the result with a DNS lookup, then rerun verification in SendLayer.

You copied the CNAME records from SendLayer, went to add them in Cloudflare (or clicked a connect button), and got this:

authentication error (adding CNAME from SendLayer)

The wording points at the permission to change DNS, not at the record. No record was written, so SendLayer will keep reporting the domain as unverified until one exists.

One honest caveat. This error was reported in a Cloudflare community thread (last seen December 2024), and I could not find a confirmed resolution there. The causes below are the likely ones, ordered from cheapest to check to most involved. Work down the list.

Why it happens

The message is an authorization failure, not a DNS syntax complaint. These are the realistic causes, most common first.

  1. You are in the wrong Cloudflare account, or the domain is not in the account you are logged into.
  2. Your role cannot edit DNS. This happens when you were invited to someone else's account, for example as a developer or marketer.
  3. An API token or connect flow lacks permission. If you used an automatic connect option rather than typing the record, a token or authorization is doing the work, and it may be missing DNS edit rights for that zone.
  4. A stale or broken session, such as an expired login, a timed-out SSO session or a browser extension interfering.
  5. DNS is not served by Cloudflare. This does not usually cause an authentication error, but it makes the setup fail afterward, so check it early.

I cannot tell you which one you have from the error text alone. The steps below separate them quickly.

Step-by-step fixes

Fix 1: Confirm the account and the domain status

  1. Sign in to the Cloudflare dashboard and check which account is selected in the account switcher.
  2. Find your domain in the list. If it is missing, you are in the wrong account (people with several accounts often are).
  3. Open the domain and confirm its status is Active.
  4. Open DNS > Records for that domain. If you can see the records but the Add record button fails on save, go to Fix 2.

Fix 2: Check your role

  1. In the account settings, open the Members page and look at your role.
  2. If you cannot open it, you are probably not an Owner or Administrator.
  3. Ask an Owner or Administrator to add the records, or to give you a role that includes DNS edit permission.

Having the Owner add the records is often the fastest route. Send them the exact host and target values from SendLayer.

Fix 3: Repair the API token or connect authorization

Do this only if you used an automatic connection (a connect button, an integration or a script).

  1. In Cloudflare, go to My Profile > API Tokens.
  2. Edit the token, or create a new one from the Edit zone DNS template.
  3. Confirm the permission is Zone > DNS > Edit, and that Zone Resources includes your domain and not a different one.
  4. Check that the token has not expired or been revoked, and that no client IP filter blocks the machine making the call.
  5. Retry. If it still fails, skip the automatic route and use Fix 5. Manual entry takes a couple of minutes.

If SendLayer offers a connect flow that asks you to authorize at Cloudflare, make sure you authorize with the account that owns the domain, not a personal login that only has access to other zones.

Fix 4: Reset the session

Log out of Cloudflare, log back in, and retry in a private window with extensions off. Boring, but a timed-out session is a plausible cause of a save failing with an authentication message.

Fix 5: Add the CNAME records by hand

Copy the host and target from SendLayer's domain setup screen. Then in Cloudflare:

  1. Open your domain, then DNS > Records.
  2. Click Add record and choose CNAME as the Type.
  3. Paste the host into Name. Enter only the part before your domain, for example selector._domainkey, not selector._domainkey.example.com.
  4. Paste the target into Target.
  5. Set Proxy status to DNS only (grey cloud).
  6. Leave TTL on Auto, then click Save. Repeat for each record SendLayer gave you.

This is how the shape looks, with placeholder values only:

Type:    CNAME
Name:    selector._domainkey
Target:  selector.example-provider.com
Proxy:   DNS only (grey cloud)
TTL:     Auto

Microsoft's DKIM documentation, which includes a Cloudflare example, says Cloudflare auto-appends the zone name and that with the proxy on, DNS lookups return Cloudflare's IP addresses instead of the CNAME target. See Microsoft's DKIM setup guide for the table. The same logic applies to any provider's verification CNAME, including SendLayer's.

Proxy status

Records that stay on the orange cloud (proxied) can fail verification even though they saved fine. Switch each verification CNAME to DNS only.

Fix 6: Look for a name conflict and where DNS is really served

A CNAME cannot share a name with another record. If an A, AAAA or TXT record already uses the same name, delete or rename it first. Mailgun's Cloudflare guide explains why: any other DNS records configured on the same hostname will never be "seen". See Mailgun's Cloudflare DNS guide for the full explanation.

Then check which nameservers answer for your domain:

dig NS example.com +short

If the nameservers returned are not Cloudflare's, your live DNS is hosted elsewhere, for example at your registrar. Records you add in Cloudflare are then invisible to the world. Add them where the nameservers point, or move the nameservers to Cloudflare first.

Which cause matches which symptom

CauseSymptomFix
Wrong accountDomain not listed, or not ActiveSwitch account (Fix 1)
Role too limitedRecords visible, save failsAsk an Owner (Fix 2)
Token or connect lacks scopeOnly the automatic route failsEdit the token (Fix 3) or add manually (Fix 5)
Stale sessionFails after a long idle timeLog out and in (Fix 4)
Proxied recordSaves fine, verification failsDNS only (Fix 5)
Name conflictSave is rejected for that nameRemove the other record (Fix 6)
DNS hosted elsewhereSaves fine, nothing resolvesUse the real DNS host (Fix 6)

Confirm the record is live

After saving, check from outside Cloudflare:

dig CNAME selector._domainkey.example.com +short

You should see the target SendLayer specified. If the result is empty, the record is not published where the world looks, or the host was entered wrongly. If it shows Cloudflare addresses, the record is still proxied. Cloudflare changes usually appear quickly, but allow some time before assuming a fault, then rerun verification in SendLayer.

One SPF record only

If SendLayer also asks for SPF, a domain can have only one SPF TXT record. Merge the new include into the existing one instead of adding a second.

Our SPF generator can build the merged value, and how to set up SPF, DKIM and DMARC covers the full set. The DNS record glossary entry explains the record types.

Checklist before you try again

  • You are signed in to the Cloudflare account that lists the domain as Active.
  • Your role is Owner or Administrator, or someone with that role is doing it.
  • The nameservers from dig NS are Cloudflare's.
  • Each CNAME Name has no domain suffix, and Target matches SendLayer exactly.
  • Proxy status is DNS only on every CNAME.
  • No other record uses the same name.
  • You waited a few minutes before pressing verify again.

If nothing works

If you are an Owner, the domain is active and manual entry still fails with the same message, contact Cloudflare support. If the records saved and resolve correctly but SendLayer still says the domain is not verified, contact SendLayer support. Include:

  • the exact error text and the time it happened, with timezone
  • your zone name and Cloudflare account ID
  • the record you tried to add (host and target)
  • your role and the steps already tried
  • the output of the dig commands above
Subject: Authentication error when adding CNAME for SendLayer domain verification

Hello,

When I add the CNAME records for SendLayer on example.com in Cloudflare, I get:
"authentication error (adding CNAME from SendLayer)".

Time (with timezone): {date and time}
Account ID: {account-id}
Zone: example.com
My role on the account: {role}
Record I tried to add: CNAME selector._domainkey -> selector.example-provider.com (DNS only)
Already tried: logging out and in, a private window, adding the record manually.

Could you tell me whether my account or role is blocked from editing DNS on this zone,
and what else I should check?

Thank you.

Where Mailneo fits

Editing the record is Cloudflare work, and Mailneo cannot change your DNS or fix a failed save. If you later connect a mailbox or provider to Mailneo, it checks your sending domain's SPF, DKIM and DMARC records and whether they authorize the provider you use, so you can see what is still missing. See email accounts for how that works.

Common questions

Is this error from SendLayer or from Cloudflare?

Most likely Cloudflare, because the wording is about authorization for a DNS change. I cannot confirm this from the one community report, which has no verified answer. Adding the record by hand tells you quickly: if it saves, the earlier failure was about the token, role or session.

Do I need the proxy off for every record?

Only records that show a proxy toggle, which means CNAME and A records. One setup guide notes that TXT and MX records aren't proxyable in Cloudflare, so for those there is nothing to switch. Set your CNAMEs to DNS only.

How long until SendLayer sees the record?

Often within minutes on Cloudflare, but I have no SendLayer-specific figure. Run the dig check first; if it returns the right target, rerun verification.

Can I use the registrar's DNS instead?

Yes, if your nameservers point there. Add the records at whichever service your nameservers point to, because that is the one the rest of the internet reads.

strategysendlayererror-codes
Share this article
Sohail Hussain

Sohail Hussain

Founder & CEO at Mailneo

Building Mailneo — AI-powered email marketing for growing businesses.

Ready to supercharge your email marketing?

Start sending smarter emails with AI-powered campaigns. No credit card required.

Get Started Free