DNS Question - Redirect from another Domain


#1

I have been using Cloudflare for several years now for a website called milklife.com. Today, I have a request to redirect pourmoremilk & www.pourmoremilk to milklife.com/pour-more-milk.

  1. I have purchased the domain from Go-Daddy.
  2. In Go-Daddy, I changed the name servers to CloudFlare.
  3. Within our Cloudflare account for milklife, I went to the DNS tab and added the following two CNAME entries that make www.pourmoremilk and pourmoremilk an alias of milklife.

Is what I am trying to do possible with Cloudflare? Does anybody have any suggestions for recommendations for me?

Thank you for your help.


#2

What I do is add the new domain to Cloudflare. Then you can redirect to milklife from the pourmoremilk domain:

Page Rule: Match pourmoremilk.com and Add Setting to Forward URL code 301 to https://milklife.com/pour-more-milk

Notes: Hopefully you’re using HTTPS. If not, then make it just HTTP.
DNS won’t forward to a path, which is why I recommend the Page Rule route.


#3

The difference between the two options is that in @user1471’s current setup when an user visits www.pourmoremilk.com it remains on that domain, while in yours @sdayman the user will be redirected. But it says, so don’t know exactly which is the best option:


#4

But how do you get a CNAME to poing to a specific directory?

The only way I can think to make this work is to modify the webserver configuration to serve pourmoremilk from a subdirectory of the milk life. Even then, the existing structure of milklife probably won’t support a separate domain hosted from a subdirectory.


#5

Oh yeah, completely missed that part :sweat_smile:
Agreeing with you now!


#6

This topic was automatically closed after 14 days. New replies are no longer allowed.