Permanent Redirect not working for me


I’ve created a page rule that redirects (301) from ‘*’ to ‘$1’. (example names). The subdomain is a client and they have been running with the hyphen for a while and now want it removed. So a redirect is what I though would do the job. The application has already been updated to provide content for the correct subdomain.

When I try ‘wget -v http: // / page.html’ (I’m a new user so had to break up the URL), I get our server doing the http -> https redirection ( to sub-domain ), rather than the page rule doing both the http -> https and the name correction. (same when running in a browser)

I’m a novice with Cloudflare, so I may have not explained something correctly.

Can anyone help please?

The alternative, as everything I am reading here seems fine, would be to make the HTTPS redirect Cloudflare side. So enable the Always Use HTTPS option in the SSL/TLS app and then do the page rule from https:// to https://.

Just to make sure, is that subdomain :orange: in the DNS tab?

We are not using Cloudflare for the http -> https at the moment though I’m unsure as to why that is the case.
We don’t have sub-domain or subdomain directly setup as we use a wildcard subdomain.

I suspect that this is the issue. The wildcard gets matched before page rules kicks in. =>

I guess you also have enabled always use https? than it run before the page rule probably

you can make page rule for only https to https redirection, or also put * in the start without the https part

The Cloudflare page rules apply only to subdomains in which Cloudflare is active. If the resolution of the DNS goes directly to your server it won’t pass through Cloudflare servers, making page rules impossible.

Your current subdomains, both actually (but the final one doesn’t matter), resolve to an eu-west1 ELB, which won’t work. To make the page rule work switch the subdomain with the - to :orange: in the DNS tab.

That’s fine. We’ll have to do the work on the server. Thank you for your comments and feedback.

You could activate Cloudflare’s caching on the old subdomain, force the redirect with a page rule and then handle via the ELB on the new one.

1 Like

What would I create (CNAME?) - I’m really that much of a novice.

The main domain ( has already its DNS delegated to Cloudflare. So just go to the DNS tab of the dashboard and click on the :grey: next to the lincolnshire-coop subdomain to make it :orange:. Done.

The page rule leave it there, it will work almost immediately, just wait for DNS propagation (5 minutes most likely here).

All working now. Thank you very much!!!

1 Like

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