CNAME and A record values for domain forwarding

dash-dns
#1

Suppose I have two domains: firstdomain.com and seconddomain.com

I want firstdomain.com to forward to seconddomain.com

I can do this with a page rule firstdomain.com/* with temporary redirect to https://seconddomain.com

But I also need to have an A record for firstdomain.com and a CNAME for www set up in the DNS section.

what IP should I be using for the A record and what domain should I use for the CNAME?

#2

Please see this post.

1 Like
#3

That says to use 192.0.2.1 as the A record, but what about the CNAME value for www?

#4

Personally I would create an A record for www and point it to 192.0.2.1 as well.

Why do you believe it needs a CNAME?

#5

If I delete the CNAME www and add an A record www with 192.0.2.1 and then go to www.firstdomain.com, I get a connection timeout error.

If I instead have a CNAME www with my old registrar’s parking page (parking.namesilo.com), then the redirect works. I’d prefer not using parking.namesilo.com for that value since I am planning on transferring my domain to CloudFlare so am wondering what a reasonable value to put in there would be

#6

Do you have a page rule in Cloudflare forwarding www?

Are you able to post a screenshot of the rules?

#7

thanks for your help.

I was able to get it to work with an A record for www to 192.0.2.1 and changing the page rule from firstdomain.com/* to *firstdomain.com/*

1 Like
#8

Glad it worked, this is the correct solution :slightly_smiling_face: Adding the * in front made it affect www as well as the root domain.

closed #9

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