Acme Challenge Page Rule Not Working

I have a CNAME record for my website set up that gets proxied through cloudflare (the orange cloud is on). I have HTTPS enabled on cloudflare. My website needs to have the SSL at the path *.mysite.com/.well-known/acme-challenge/* disabled so that my SSL certificate can be renewed. I also need to forward any requests to www.mysite.com to mysite.com so I’ve added two Page Rules for this:

  1. URL: *.mysite.com/.well-known/acme-challenge/*
    Settings are SSL Off, and Automatic HTTPS Rewrites Off.

  2. URL: www.mysite.com/*
    Settings are Forwarding URL 301 - Permanent Redirect to https://mysite.com

The second page rule always works. However, if I try and go to the address www.mysite.com/.well-known/acme-challenge/1234 this doesn’t work. It just says “Failed to open page, too many redirects occurred”. What happens is it starts off as an https address, the SSL gets disabled, so redirects to an http address, then it redirects that to an https address and so on. How can I fix this?

I’ve solved it! Automatic HTTPS redirects need to be turned off in the SSL/TLS settings. And then a site wide redirect with page rule http://*mysite.com/*needs to be added with the setting “Always Use HTTPS”.

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