How can I redirect the domain name to my subdomain? My domain name has an A record and is pointing to a GoDaddy IP for hosting and I want to temporarily send all of my domainname traffic to the subdomain landing page. The subdomain is using Unbounce pages through a cname. I want my domainname traffic to be redirected to join.mydomain subdomain but I cant simply change the domain name A record to Unbounce page because they use Cname not Ip address. Does anyone have a solution or maybe a different approach?
As long as your domain is proxied by Cloudflare, you can redirect it to another domain or even to one of its subdomains, by crafting the right Page Rule or Redirect Rule.
With a Redirect Rule (beta), you should use a condition where incoming requests match:
Hostname equals example.com
Then a redirect with type Dynamic with the expression:
with Preserve Query String:
Thank you for the reply. Yes, my domain is proxied by Cloudflare. I setup the Redirect Rules as recommended in your post. When I or anyone else goes to the main url it still shows the old GoDaddy website until the user hits browser refresh then they are taken to the subdomain. This is experienced with users who have never visited the old or new domain in other parts of the world.
What would cause that behavior?
This is probably a caching issue. Try visiting Cloudflare Dashboard > Cache > Configuration, where you then click on Purge Everything.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.