Encountering the Cloudflare redirect loop error is a common occurrence, but it can be easily resolved and prevented once you identify the root cause.
Understanding the Cloudflare Issue
Cloudflare specifies that the “Flexible SSL” encryption mode in the SSL/TLS app Overview tab encrypts traffic between the browser and the Cloudflare network over HTTPS. However, using the Flexible SSL option results in Cloudflare sending unencrypted requests to your origin web server over HTTP. Redirect loops occur when your origin web server is configured to redirect all HTTP requests to HTTPS, causing a loop in redirection.
The redirect loop occurs due to the conflict between Cloudflare’s Flexible SSL mode and the server’s redirection settings from HTTP to HTTPS.
Fixing and Preventing Redirect Loops
Follow these steps to resolve and prevent redirect loops:
- SSL within Pressillion: Before proceeding, ensure an SSL certificate is provisioned for your website on your server within your account.
- Choose Full (Strict) SSL Option: Once the SSL certificate is fully provisioned for your website, navigate to your Cloudflare dashboard. In the SSL/TLS app, select the “Full (Strict)” SSL option. This setting establishes a secure connection between visitors and your Cloudflare-managed domain and ensures an encrypted connection between Cloudflare and your server.
This option mandates a valid SSL certificate on your origin server, thereby preventing redirect loops caused by conflicts between Cloudflare’s Flexible SSL and server-side redirection settings.
By enabling an SSL certificate for your website within Pressillion and selecting the “Full (Strict)” SSL option in your Cloudflare dashboard, you resolve the redirect loop issue caused by conflicting HTTPS redirection configurations.
This preventive measure ensures a secure and seamless connection between visitors and your website, preventing redirect loops commonly associated with Cloudflare‘s Flexible SSL mode conflicting with server-side HTTP to HTTPS redirection settings.