Many subdomains on many manchines

hello everyone, I’m new to the Cloudflare community but have some DNS experience.
Here’s my challenge: I have a domain whose root and www point to a public server with marketing content.
Then I have a subdomain for each client like this:
domain . com -> public content
www . domain . com -> public content
aaa . domain . com --> client AAA
bbb . domain . com --> client BBB
right now they’re all on the same machine, so my CNAME entry with a wildcard works perfectly.

this server is getting overloaded, so I’m going to start hosting each client on their own VM with a static address. I thought I could just create new A records with the IP address and matching CNAME records that point back to the A…
A – domain . com – 1 . 1 . 1 . 1
CNAME – www . domain . com — domain . com
A – bbb . domain . com – 2 . 2 . 2 . 2
CNAME bbb . domain . com – bbb . domain . com

But alas this doesn’t work,

I even tried removing the wildcard and just putting explicit subdomains into the record (same server, same IP) - and that didn’t work either.

It’s like it only works with a wildcard.

What is the proper way to have multiple subdomains on distinct machines organized in the same DNS record?
Thanks in advance for your comments!

1 Like

UPDATE: I think I figured it out.
I deleted the wildcard CNAME entry
Next I added A records with subdomain…

AAA . domain . com – 1 . 1 . 1 . 1
BBB . domain . com – 2 . 2 . 2 . 2
…it seems to work. I guess I don’t need a CNAME record for subdomains… or do I?

Thanks again.

1 Like

I prefer not to use CNAMEs. Subdomain “A” records with IP address work great.

1 Like