Redirect sub-domain URL to a different sub-domain URL using page rules doesn't seem to be working

#1

I am migrating my website from http://www.abluestar.com/blog/{page name} to https://blog.abluestar.com/{page name}

I have both sub-domains passing thought the Cloudflare DNS

I have setup the following page rule

Matching: https://blog.abluestar.com/*/
Forwarding URL: https://blog.abluestar.com/$1

I would expect that the old URL would be redirected to the new URL. See example below.

Old URL: http://www.abluestar.com/the-giant-claw-game-relay-h-bridge-and-circuit-design
New URL: https://blog.abluestar.com/the-giant-claw-game-relay-h-bridge-and-circuit-design

But instead I get the following error message ( ERR_NAME_NOT_RESOLVED) when I click the old URL link.

image

What have I done wrong?

Thank you for your time.

#2

I also double check to see if the cloud flare DNS was working from external sources and it appears to be. I used https://mxtoolbox.com/ for this check

www.abluestar.com

blog.abluestar.com

#3

That must be a DNS resolution issue on your side.

Your www host works for me as well as on http://sitemeer.com/#https://www.abluestar.com/

I’d suggest to wait a bit more until your resolver flushes its tables and gets the updated records, after which it should work for you too.

Also, unless the first page rule really should be specific only to your blog host you could enabled HTTPS site-wide in the crypto settings and save that one page rule.

#4

Thank you, this worked as you described.

You are correct, Eventually the page started producing a 404 error instead of a ERR_NAME_NOT_RESOLVED

Next problem:

I am hosting blog.ablustar.com on github pages and I have configured www.abluestar.com to be an alias of blog.abluestar.com. I incorrectly expected that the page rules would override the DNS alias.

The issue is that this request http://www.abluestar.com/the-giant-claw-game-relay-h-bridge-and-circuit-design hits the github pages server and 404s because the domain www.abluestar.com does not exist there.

So there a way to “park” a domain with cloudfront. so that the “page rules” get a chance to run on the url?

#5

This article says that the page rules should be running as long as the domain is proxied by cloudflare in the DNS settings.

So why is the old url not redirecting to the new url ?

#6

I figured it out. I needed two page rules to resolve both issues that I was having. See screen shot below.

Issue resolved

Thank you @sandro for your help

1 Like
closed #7

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