There is a common issue of renewing AutoSSL Certificates while using Cloudflare for the domain.
"Local HTTP DCV error (domain.com): The content "<html> <head><title>301
Moved Permanently</title></head> <body> <center><h1>301 Moved Permanently
</h1></center> <hr><center> …" of the DCV (Domain Control Validation) file,
as accessed at
and redirected from
did not match the expected value."
To resolve this error, you would need to disable "Always Use HTTPS" in Cloudflare. This option is in the Edge Certificates tab of the Cloudflare SSL/TLS tab. Once disabled, you can then renew your certificate. After you have replaced the SSL certificate, you may re-enable the option if you wish.
Additionally, you may need to disable the "Automatic HTTPS Rewrites" on this same page.
You can find more on Cloudflare's HTTPS Redirection here:
To avoid the requirement to disable this once each month, you should consider using an alternative method to redirect to HTTPS more selectively.
Additionally, you can also install SSL certificates via Let's Encrypt as Let's Encrypt allows for redirections. More on installing Let's Encrypt can be found here: