Newbie here. Forwarding related question

dash-dns
#1

Hi,

We have a question.

We have 2 domains. domain A and domain B

The domain A is set up with Cloudflare and running correctly.

We need to set up domain B to forward the visitor automatically to domain A.

On the server where the site for domain A is hosted, there are other websites. They are sharing the same IP address.

How to set up the DNS for domain B such that the user will only be forwarded to domain A instead of other sites? Should we move the site for domain A to a dedicated server?

Thanks a lot!

#2

You’ll want to create a Page Rule.

3 Likes
#3

Got it.

What about the CName?

What should I enter there?

#5

Hi,

I did the following:

Leave the DNS records blank.

Added a page rule that when someone enters domain B it will forward to URL domain A.

And I got this error message when entering domain B in the browser: A server with the specified hostname could not be found.

What did I do wrong?

#6

For the page rule to fire, you need a DNS record set to :orange: for the domain. You can just create a dummy A record pointing to 192.0.2.1.

Using page rules to perform redirects

#7

And also I see this error:

An A, AAAA or CNAME record was not found pointing to the root domain. The healingsinmotion.com domain will not resolve.

#8

Create 2 DNS records, one for @ and one for www in the DNS tab of your Cloudflare dashboard. Point them both to 192.0.2.1 and then the page rule (if configured correctly) will work. :slightly_smiling_face:

You see this message because you have no DNS record for @.

#9

healingsinmotion.com is the domain B I am struggling with.

#10

I just tried.

In the DNS I added an A record using the dummy IP.

It still gives me the same error:

A server with the specified hostname could not be found

#11

Aside from this A record, anything else I should add to the DNS?

#12

I am now redirected from

to https://healingsinmotion.org which I presume is what is intended.

It may take some time to propagate / cached values to clear but the redirect works for me.

#13

I also found this:

NOTE: Traffic must be passing through Cloudflare for Page Rules to work, if you are using Cloudflare for DNS only then Page Rules will not be active.

The site is hosted in Digital Ocean. I am using Cloudflare for DNS.

In this case, how can I make this work?

#14

That is what the :orange: means in the A record you added earlier.

#15

It works now. Thank you so much!

2 Likes
closed #16

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