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 @ -> example.com
CNAME api -> api.example.com
CNAME mail -> mail.example.com
Keep in mind your server will also need to know about the .net records, in case you configured virtual hosts for .com.
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 have two ‘A’ records on roccodev.pw pointing to GitHub’s IP (192.30.252.153, 192.30.252.154).
When I CNAME ‘roccodev.pw’ 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?