Jump to content

Recommended Posts

Posted

Has anyone ever redirected a URL using Cloudflare?

 

Our old 'schoolname.county.sch.uk' URL points to our old website (which actually isn't there anymore as of a few days ago) and we've got a new website at a new domain which is essentially 'schoolname.co.uk'. I'm trying to set up a redirect in Cloudflare where our old domain is managed; I've tried setting up both a hostname redirect and a page rule but neither seem to work correctly and I can't figure out why.

 

So I've had it set where 'www.schoolname.county.sch.uk' OR 'schoolname.county.sch.uk' redirect to 'www.schoolname.co.uk' with a HTTP status of 301 Permanent Redirect. However, when I test it on a computer outside of our network, Firefox will redirect to 'https://schoolname.co.uk/www.schoolname.co.uk' and Chrome/Edge tries to redirect to 'https://www.schoolname.county.sch.uk/www.schoolname.co.uk', neither of which works properly as it seems to either prepend the old domain or the new one.

 

I've still got the old A DNS records set which point to the old webhost IP but these are set to 'Proxied' instead of 'DNS only' as that's what it suggested when I set up the redirects.

 

Any help is welcome.

Posted

Make sure you add "https://" to the start of your redirect to URL, it sounds like it doesnt have that. If you want you can post a screenshot of your rule.

We (EduGeek) use Cloudflare a lot and I am in it nearly daily.

 

For example below it will redirect anything http to https including following paths such as /something.html to the correct path:

 

image.png

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...