After acquiring SSL certificate for your domain, a redirection is made so your clients could reach your new safe URL address instead of the old one. The redirection loop means that instead of linear redirect flow between one URL to another, some other redirect appears.
The most common cases for redirect loop:
1. Wrong Cloudflare settings.
To avoid the redirect loop using Cloudflare, the most important thing is to leave the Universal SSL enabled in the settings. It should look like this:
Also, choose one of the three available SSL options in Cloudflare:
- Flexible if your origin web server cannot accept secure (HTTPS) connections.
- Full if you have an SSL certificate on Hostinger server. The validity check gets bypassed, so the SSL certificate can be self-signed or expired.
* If you have an SSL from Hostinger, this option is highly recommended.
- Full (strict) if you have a valid SSL certificate issued by a certificate authority and it isn't expired.
2. Script and .htaccess have different redirects.
Your .htaccess needs to fit the configuration of your script. For example, if your script is going to "https://example.com", make sure that your .htaccess is also going the same way to the same "https://example.com" :)
3. Home WordPress URL in database is wrong.
To change WordPress URL you need to put this code into the wp-config.php file:
Just a reminder! You need to change the domain name from example.com to your domain name :)
Having problems? Our support team is here for you 24/7!