Newbie here. Forwarding related question

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!

You’ll want to create a Page Rule.
https://support.cloudflare.com/hc/en-us/articles/218411427-Understanding-and-Configuring-Cloudflare-Page-Rules-Page-Rules-Tutorial-

3 Likes

Got it.

What about the CName?

What should I enter there?

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?

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.

Deprecated - Using page rules to perform redirects

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.

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 @.

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

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

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

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.

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?

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

It works now. Thank you so much!

2 Likes

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