Two domains pointing to same DNS


Hello there.

So basically I’ve got two domains, let’s call them and example(dot)net.

I have some basic DNS on, let’s say:

  • an ‘api’ CNAME record,
  • a @ A record,
  • a ‘mail’ MX record.

Is there a way to have the same DNS records on example(dot)net as well?
So like if I went to api.example(dot)net it would be the same as api.example(dot)com etc.


There is nothing automatic, but you could duplicate all .com records as CNAMEs in the .net domain. In that way you at least wont have to configure IP addresses twice.

Typically Cloudflare is not too fond of such pointers to records already managed by Cloudflare and throws a 1014 error, however that seems to apply only when referencing domains belonging to another user account. Assuming your two domains belong to the same account, the following approach for your .net domain might just work

CNAME @ ->
CNAME api ->
CNAME mail ->

Keep in mind your server will also need to know about the .net records, in case you configured virtual hosts for .com.


Thank you for your reply.

What do you mean by ‘your server will also need to know about the .net records’?
For example, I have this Github Pages site, and I can only add one domain record to it.
Is there anything I can do there?


I am not sure what you mean. Can you post the two domains and the records you’d like to match?


I have two ‘A’ records on pointing to GitHub’s IP (,
When I CNAME ‘’ from another domain of mine, I obviously get an error in my browser since GitHub most likely doesn’t recognize the other domain.

The issue is, GitHub only allows one custom domain per account, so is there any way to ‘point’ the other domain to that?


Not via DNS. You could configure a redirect with a page rule.

closed #7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.