Origin Redirect + Error code 526

I’m curious what is going wrong.

I want to be able to use file upload HTTP validation method for my SSLs.
My website is set to Always Use HTTPS.

Problem

I created an origin rule to communicate with the server via HTTP instead of HTTPS, but it isn’t doing anything and I am getting 526 error: Invalid SSL certificate Error code 526

Origin Rule

(http.request.uri.path contains “.well-known/”) → rewrite to 80 port (HTTP).

Request:

curl -I http://hello.staqme.com/.well-known/nizar.txt

Response

HTTP/1.1 301 Moved Permanently
Date: Tue, 07 May 2024 09:14:13 GMT
Content-Type: text/html
Content-Length: 167
Connection: keep-alive
Cache-Control: max-age=3600

NEL: {“success_fraction”:0,“report_to”:“cf-nel”,“max_age”:604800}
Server: cloudflare
CF-RAY: 88001939cb781bb3-MAD
alt-svc: h3=“:443”; ma=86400

The error 526 indicates an issue with the SSL certificate on your server, which can be caused by various reasons. However, based on the description you provided, it seems like you are trying to use an HTTP validation method for SSL certificate file uploading for your website, but you are encountering issues.

Here are some suggestions on what might be going wrong:

  1. Server Configuration: Make sure your server is correctly configured to respond to HTTP requests on port 80 and HTTPS requests on port 443. If you have set up your website to always use HTTPS, it’s important that your server configuration properly handles redirection from HTTP to HTTPS.
  2. Cloudflare Origin Rule: Your origin rule seems correct for redirecting requests with the “.well-known/” path to port 80. However, it’s important that this rule is correctly configured and active on Cloudflare.
  3. SSL Certificate: Ensure that your server has a valid SSL certificate configured properly for your domain. You may want to check the SSL certificate configuration on your server to ensure it’s correct and there are no errors in the configuration.
  4. Browser Cache: If you have made changes to the server configuration or to Cloudflare, make sure to clear your browser cache and try visiting your website from a private browser or in incognito mode to avoid cache issues.
  5. Cloudflare Configuration Errors: Check for any configuration errors in Cloudflare that might be causing the error 526. Make sure to review the Cloudflare settings for your domain and correct any configuration errors.
1 Like