Redirect main domain to another Domain

I’v two domains domainA and domainB. There are multiple subdomains under both for which the certificates are issued by aws ACM. i want my main domainAto redirect to domainB. For this I added two entires in Page Rules.

  1. http://domainA.io/* Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://domainA.io/*)
  2. domainA.io/* Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://domainB.com/*)

Now when i enter domainA address in browser it says This site can’t be reached. If i do curl to domainA it says Could not resolve host.

What I’m doing wrong here.

First, no need for 2 rules, just redirect domainA.io to domainB.com
In Page Rules, redirect from *domainA.io/* to https://domainB.com/$2 (the $2 matches the second *).

Make sure you have a DNS entry for domainA.io. Use a dummy proxied value of A 192.0.2.1 or AAAA 100:: as the domain is only for redirect with no real host.

3 Likes

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