How to create a redirect, that works with HTTPS?

I want to redirect all traffic from one domain to another.

For example: foo.mydomain.com/abc/xyz should redirect to https://newdomain.com/abc/xyz.

I successfully managed to do this using “page rules”.
Unfortunately you need to create a DNS record for page rules to work.

So I create a CNAME record that goes to a subdomain that I don’t use:

CNAME foo.mydomain.com dummy.mydomain.com (Cloudflare proxy active)

Redirecting works fine for http://foo.mydomain.com.

But when I go to https://foo.mydomain.com I get a ERR_SSL_VERSION_OR_CIPHER_MISMATCH error on Chrome (similar error for other browsers).

Please help.

Here’s a simpler method:

1 Like

Thanks for the link.
This is exactly what I did, but the HTTPS version seems to give me the error I mentioned.
Any solution to this?

Actually I found out something odd.

I have 2 records similar to:

A foo 192.0.2.1
A www.foo 192.0.2.1

I also have 2 page rules:

Rule 1:
www.foo.mydomain.com/*
forwards to htps://newdomain.com/$1

Rule 2:
foo.mydomain.com/*
forwards to htps://newdomain.com/$1

It looks like htps://foo.mydomain.com works fine.
But htps://www.foo.mydomain.com does not.

Note that HTTP varients of all of them works as intended.

I had to call it htps instead of HTTPS, becuase the forum bizarrely doesn’t allow me to place more than 2 links for new users.

but my real rules use https:// . Not htps://

www.foo won’t work because:

2 Likes

That’s annoying. Thanks for the help!

1 Like

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