Redirect https://abc.ai to https://abc.co

27 Views Asked by At

I have two domains in cloudflare DNS - abc.ai and abc.co

My main website is on abc.co So I want to redirect the user to https://abc.co whoever comes to https://abc.ai

I tried creating a CNAME in DNS records of abc.ai, but it didn't work.

TYPE = CNAME
NAME = abc.ai
TARGET = abc.co

Is there a way to do it?

1

There are 1 best solutions below

0
Vy Do On

Redirect one domain to another If you have an alias domain that only forwards traffic to another domain, you can set up redirects directly within Cloudflare.

  1. Add your alias domain (for example, previous.com) to Cloudflare.

  2. Make sure that your alias domain has a proxied DNS A or CNAME record that properly resolves DNS queries. You may also want to include a record for the www subdomain.

enter image description here

  1. Use Bulk redirects to forward traffic from your alias domain to your other domain. Select Include subdomains and Subpath matching to cover your entire alias domain (for example, www.previous.com and www.previous.com/examples).

enter image description here

Source: https://developers.cloudflare.com/fundamentals/setup/manage-domains/redirect-domain/