I want to create an alias domain… I have my main domain with DNS points to Cloudflare, an Cloudflare account running perfect.
I have now another secondary domain and I want to administrate it with the same account… And I want when users write secondary domain in browser URL, they see main domain
I tried creating an CNAME record for secondary domain is an alias of main domain but is not working. I tried creating a A record for secondary domain pointing the same IP as main domain but doesnt work
You would need to add that second domain to Cloudflare. Then you create whatever DNS records you want and point them to dummy addresses and serve an appropriate redirect to your primary domain via a page rule.
So part of this would be configuration on your origin server to serve the same content for both hostnames when requested. On the Cloudflare side you would just point to the same origin IP.
Same account? You would/could/should add that domain to the same Cloudflare account where you maintain the first one.
Actually, unless you specifically want to use Cloudflare you could simply configure a redirect on your registrar’s side, given they provide such a service (which many actually do).