How do I fix the infinite redirect loop error after enabling Flexible SSL with WordPress?
September 29, 2016Some users may experience redirect loops after activating CloudFlare’s free Universal Flexible SSL option with a WordPress site. In order to fix this issue and/or get things set up properly to use with WordPress, please follow the steps outlined below:
1. Install either CloudFlare Flexible SSL WordPress plugin or WordPress HTTPS plugin. Many WordPress users are using these plugins to resolve redirect loop issues in WordPress and to make the transition to https:// easier.
Note: These plugins were not created by CloudFlare.com and we do not provide support for questions related to these plugins. If you have questions or issues related to using either one of these plugins, please direct your concerns to the plugin author.
2. Install the CloudFlare WordPress plugin to make sure that the original visitor IP is being passed back at the WordPress level. Since it is likely that some of your other plugins rely on original visitor IP, installing the CloudFlare WordPress plugin will restore visitor IPs back to the WordPress level and not show CloudFlare’s IPs.
3.Go to your website over https:// to see if your website loads. Given that you didn’t have the domain set to use SSL prior to activating Universal SSL, it is likely that you will have a mixed content error warning when you look in the corner of your browser window. In order to make this error go away, you will need to go through your site and make sure assets are being loaded over HTTPS and not HTTP. Solutions can be found at:
Mozilla’s tutorial on fixing mixed content errors
WordPress Plugin: SSL Insecure Content Fixer
4. Create a page rule with the Always Use HTTPS action for the pattern “http://*example.com/*”, replacing example.com with your domain to redirect all HTTP requests to HTTPS at our edge.
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Leave a Reply