I’m trying to re-direct from https://hub.kssschoolofpas.org to https://hub.seschoolofpas.org
The naked domain redirects fine because it points to a different server that has SSL installed there and the redirect is also handled on the server.
However, I’m unable to set SSL up in the case of https://hub.seschoolofpas.org because that’s using a different service where I have no control of any of that stuff, so I want to do it via DNS instead.
I’m getting an error that connection is not private when going to https://hub.kssschoolofpas.org so it’s not redirecting for anybody who also encounters this. I have an edge certificate set up within Cloudflare, what could I be doing wrong?
I’m redirecting via DNS for hub.kssschoolofpas.org using a CNAME pointing to hub.seschoolofpas.org
A CNAME is not a redirect. When a connection is initiated to an alias (hub.kssschoolofpas.org) it will connect to the canonical name (hub.seschoolofpas.org), but the HTTP hostname header will contain the alias. This means that the server listening on the canonical name will need to know how to respond to requests for the alias.
You can think of it like this: you create a CNAME for the alias bob that points to the canonical name robert. All requests to bob are be directed to robert. Unfortunately robert does not respond to the name bob, so you get a confused look instead of the response you expected.
The good news is that you can easily configure an actual redirect using Cloudflare and your existing CNAME.