How to add alias domain to cloudflare

Hi, I am newbie. I just added my site on Cloudflare with main domain. Now I want to add my alias domain on Cloudflare, which mean if user click my alias domain, it will link to main domain site.
I follow the support A2hosting (where I bought hosting) and they said just no to do samething as I do with main domain. But it is not working. Do I need to wait 24 hours or add anything at main domain DNS? Please help me. Thank you so much.

So if both Domain A and Domain B are already on Cloudflare you’d simply create a page rule on Domain B to redirect your visitors on A. This would only take a minute or so.
If Domain B is not on Cloudflare, you’ll have to add it, create the new Page Rule and wait for propagation.

2 Likes

Hi there, thanks for your help. So I just go to Domain B on Cloudflare and creat a Page Rule, choose the setting Forwarding URL 301, fill in Domain A then save and deploy. Did I do it right and how long we need to wait for it?

1 Like

Exactly. Changes should be seen immediately. If not, purge Cloudflare’s cache and your Browsers cache to make sure.

1 Like

It is not working. I did purge Cloudflare’s cache and browsers cache. On page it shows that can not find IP DNS_PROBE_FINISHED_NXDOMAIN

This should help

This will test propagation

1 Like

I checked and it shows all resolve. There are few things make me confuse:
1/ In my hosting cPanel I add Domain B as alias domain
2/ When I add Domain B to Cloudflare, there is only one value in DNS: type TXT (Domain A has more like type A, CNAME, MX, SRV, TXT). I dont know if there are any problems with Domain B
Sorry because I have zero IT skills, just tell you what I see. By the way thank you very much for your help, I am very appreciated.

1 Like

Hey no need to apologize, we’re here to help :slight_smile: As for the missing records, start by creating an A record for Domain B that points to the same IP as Domain A.

image

2 Likes

Well it worked when I add IP pointing to Domain A. Thanks so much for your help.

This topic was automatically closed after 31 days. New replies are no longer allowed.