Access to my sites is like wires are crossed


#1

Not sure where to post.

I have a bunch of domains for which I use CloudFlare. As of just now, for three of them, the wires seem to be crossed.

I want to retire domainA, redirecting requests for domainA to domainB. I deleted domainA from CloudFlare and reverted to the DNSs of the registrar, having the registrar redirect requests for domainA to domainB.
The result was not at all as expected, so I decided to arrange the redirect myself via a PHP redirect.

I reverted the DNSs for domainA to CloudFlare and reinstated domainA on CloudFlare. Then I put a simple PHP redirect in the root of site of domainA to point to domainB.

But, now, requests for domainB returns a ‘too many redirects’, and requests for a domainC, hosted on the same server, actually shows the content of domainB (while requests for domainA show a message from the registrar, but I can assume that’s because their most recent change hasn’t propagated yet).

I’m ok with assuming that the too many redirects for domainB are the result of turning off, then on, flexible https, requiring me just to wait a bit for this to start working again. Though even that doesn’t seem right to me.
But the sudden mixup of requests for domainC pointing to domainB makes no sense.

And, I have no idea how to troubleshoot this.

How to proceed?


#2

It would help if you posted the actual domains.

The best way to redirect is to use Page Rules. As long as the initial domain is set up at Cloudflare with :orange: DNS entries, this is a good start.

Page Rule to Match exampleA.com/* and add a Setting for Forwarding URL to exampleB.com/$1 (use the $1 if you want to forward the path as well. Otherwise, leave off the $1)

The PHP redirect from Domain A might have something to do with redirecting C to B.


#3

Thanks for the quick response. (I can only put two links in a post, apparently, so with a bit of a hassle.)

Domain that I want to retire: dopplr dot org (domainA).
Domain that was stuck in an infinite redirect: theplacesihavebeen dot com (domainB).
Domain (domainC) that suddenly started pointing to another domain (domainB): babakfakhamzadeh dot com

DomainA still shows a registrar placeholder for me.
The infinite redirect for domainB has resolved itself, it seems. And, the website now seems to function as it should.
DomainC still redirects to domainB.

These are three separate domains, hosted on the same server with three different hosting packages. So, they use three accounts with both my hosting provider and CloudFlare.


#4

Domain A is pretty blank for me. The Page Rule mentioned above should properly send your visitors to Domain B.

Domain B is showing me a June 1 Launch notification.

Domain C is also showing Domain B’s content. I strongly suspect this is a server configuration issue. My hunch is you don’t have SSL properly set up on your server for Domain C. Some servers improperly redirect when SSL is improperly configured (or nonexistent).

What is Domain C’s SSL configuration? On Cloudflare, is it Flexible, or Full? If it’s Full, then did Domain C work properly with SSL before you put it on Cloudflare? I’d set C to Flexible to see if that fixes it.


#5

DomainA being blank is, I assume, due to the changes at the register not having propagated yet.

DomainC’s SSL configuration is set to Flexible and has been set to Flexible for six months, as it has for domain B. For both, SSL is not set up on the server. Both sites have worked fine for years, and domain B seems to be working fine, again.
The only changes I made earlier today were to settings for domainA and domainB, both with my registrar and CloudFlare.
(But, domainC is registered with the same registrar and configured under the same account on CloudFlare.)


#6

Problem with domainC was with hosting provider. It seems that making changes on the server (in the hosting control panel) for domainA and domainB indeed somehow resulted in crossed wires for domainC, for which both the server folder and user had been updated.


#7

I’m guessing Cloudflare threw an error because the deleted domain was no longer on Cloudflare.

I’m not sure why you reverted the DNS to Cloudflare for domain A if your were going to use the origin server to redirect using PHP. But since you did move it back a simple page rule would have sufficed and the redirection would have been done on Cloudflare’s edge.

I would gray cloud all of your records and see what works/ doesn’t without Cloudflare in the mix. If requests to the origin of site C show site B that is likely an issue with the changes in php code you mentioned. Removing Cloudflare form the mix by :grey:, at least temporarily reduces the number of variables.


#8

Thanks.

The initial result primarily saw the redirects facilitated by the registrar being prevented with a message saying that the connection was insecure.

I reverted to CloudFlare because I wanted to get back to the state of things before I was getting unexpected results.

I now know that requests for domainC showing domainB was an issue with the hosting provider, where, somehow, changes I made to domainA and domainB also saw some changes being made for domainC. (Easiest is to assume I someone wasn’t paying attention when making changes, but I find that a bit unlikely, tbh.) So, that had nothing to do with CloudFlare.

This does still leave the automated redirect of domainA to domainB, but that seems to be stuck on the registrar not updating their configuration.


#9

As @cscharff said, this can easily be be accomplished by moving domainA back to Cloudflare and using a page rule. Probably quicker for end-users too.


#10

Yeah, that’s what I thought. But the domain kept resolving to a page at the hosting provider’s.

Turns out that, while all was change, CloudFlare was pointing not to my hosting provider, but to my registrar.

Took a while, but, solved.


#11

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