Redirect 301 not working via page rules

Hi,
I’ve tried to redirect whole traffic from all subdomains and subpages of domain to my new domain.
I’ve tried to do it with rules provided in this topic: Need to redirect multiple subdomains on 1 page rule

I’ve used following rules:

  1. .[DOMAIN]/ // Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://p2u.pl)
  2. [DOMAIN]/* // Forwarding URL (Status Code: 301 - Permanent Redirect, Url: NEW-DOMAIN)

In the effect, I’ve only managed to redirect traffic from homepage and all subpages.

There is no redirection from any subdomain i.e. [test] . DOMAIN or [test] . DOMAIN / [test2]

What should I provide here to cover ALL POSSIBLE URLs from this domain?

ps. sorry for that fuzz with DOMAIN but there is a limit for 2 urls.

Can you just post a screenshot of the Page Rules? If you’re going to blank anything out, do the least possible so we can see enough to diagnose.

Sure! Attaching.

m66.pl is not using Cloudflare. Otherwise, those forwarders would work.

You could even combine them into one rule to match *m66.pl/*

I have disabled the service for few moments for test.
I have reenabled CF by bringing back CF DNS servers.

I have also updated Page Rule for one mentioned.
Unfortunately redirect from test.m66.pl is still not working (DNS_PROBE_FINISHED_NXDOMAIN).

That tells me there’s no DNS record for ‘test’. There’s one for ‘www’ and that works.

Is there a possibility to make such redirection for all existing AND FUTURE subdomains?

That Page Rule will handle all future subdomains. The current ‘test’ problem is due to DNS. You’d have to add a :orange: DNS entry for each subdomain you add. I use a domain registrar (Gandi.net) that lets me to an entire domain forward to a single URL.

I thought that I have set CF DNS addresses in my domain operator, whole domain DNS management is done on CF?

Unless your domain operator ties into Cloudflare DNS as a Hosting Partner, you’ll need to update your DNS entries in the Cloudflare Dashboard.

So in other words I have two options?
Opt 1 - keep the Page Rule and add DNS record in CF for every single domain,
Opt 2 - use my domain operator functionalities to use wildcards and disable CF in the same time?

Correct. Those are your two options. I’d go with Option #2. You’re really not using any of Cloudflare’s special features anyway.

I am sure The Scharff would know about a third :sunglasses:

There’s really nothing, short of an Enterprise plan. The hostname needs to be :orange: for Cloudflare to forward the request.

:slightly_smiling_face: