Locally hosted Website Infinitely Redirects

Hello, I would like some help if possible.

I have Cloudflare proxying my domain and in DNS settings I have a Google-hosted WordPress website as well as another locally hosted Apache2 Website, which is being port forwarded through my local PFsense firewall. The Apache2 server has its letsencrypt cert installed and I have configured my DNS settings so both the Google Hosted Wordpress website and the locally hosted website which both have A records.

The ping from the locally hosted Apache2 server returns a Cloudflare address, so it’s hitting the Cloudflare DNS. The Google-hosted WordPress works with no issues from the outside. However, the locally hosted Apache2 site does not, it just keeps re-directing almost in a continual loop and the browser says it has been re-directed too many times. Internally the Apache2 website works fine on the correct URL. its something to do with the way Cloudflare proxies this, but I am unsure on how to get it to work. Can anyone help?


Without a URL to test, there’s not much we can offer as a suggestion. It could be an HTTPS loop, or a URL loop.

Was your site working with HTTPS before you added it to Cloudflare? Are you using Full (Strict) for your SSL/TLS mode?

It’s only been used on Cloudflare


Hope that helps?

It’s saying the direct is coming from Moodle:
x-redirect-by: Moodle

I suggest you use the “Pause Cloudflare on Site” option from the Overview tab for your domain at dash.cloudflare.com. The link is in the lower right corner of that page. Give it five minutes to take effect, then make sure site is working as expected with HTTPS. Only then should you un-pause Cloudflare and double-check your SSL/TLS setting to make sure it’s Full (Strict).

Hi Sorry for the delay.

I can now browse to it away from the network and indeed it works with that function disabled. However, the main site is not secure.

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