What causes “too many redirects”
Each redirect sends the browser to another address. When two rules disagree, they send it back and forth until the browser gives up.
- A WordPress Address or Site Address that does not match the address the server sends visitors to, such as
httpagainsthttps, orwwwagainst nowww. - A CDN or proxy, such as Cloudflare in Flexible SSL mode, that connects to your server over http while the server forces https.
- Conflicting redirect rules in
.htaccess, in cPanel, or in a redirect or SSL plugin. - A cache that still serves an old redirect.
- Old cookies in your browser, which can keep a loop going after the fix.
Clear cookies and find the loop
Rule out your browser first.
- Open the site in a private (incognito) window.
- If it loads there, clear the cookies and cached files for your site in your browser’s settings, then reload.
- Try another browser or device.
- To see each redirect, run
curl -IL https://example.comin a terminal, with your own domain. A loop repeats the same two addresses until curl stops.
Fix the WordPress Address and Site Address
Both should use the exact address your site loads on, usually the same for both.
- In the WordPress dashboard, open Settings › General.
- Set WordPress Address (URL) and Site Address (URL) to your address, with or without
wwwas your site uses it, for examplehttps://example.com. Usehttpsonly if the site has a valid SSL certificate. - Click Save Changes, clear your cookies and reload.
- If you cannot open the dashboard, open
wp-config.phpin cPanel › File Manager and adddefine( 'WP_HOME', 'https://example.com' );anddefine( 'WP_SITEURL', 'https://example.com' );above the “stop editing” comment. - Or open cPanel › phpMyAdmin, choose the database named in
DB_NAMEinwp-config.php, and open the options table,wp_optionsby default. - Edit the
option_valueof thesiteurlandhomerows to the same address, with no slash at the end. - Values set in
wp-config.phpoverride the database and lock the two fields in Settings › General. Remove the lines to edit them there again.
Check .htaccess and plugins
If the addresses are right, another redirect is fighting them.
- In cPanel › File Manager, open
public_htmland turn on Show Hidden Files in Settings to see.htaccess. - Look for
RewriteRulelines that send visitors to https or www, usually above# BEGIN WordPress. Keep one HTTPS rule, and make its target match the WordPress Address. - To test, rename
.htaccessto.htaccess.bakand reload the site. If the loop stops, rename it back and remove the rule that caused it. - Check cPanel › Redirects for a redirect on the same domain that disagrees with the WordPress Address.
- In cPanel › Domains, see whether Force HTTPS Redirect is on. Force https in one place only: there, in
.htaccessor in a plugin. - In WordPress, open Plugins and deactivate redirect, SSL and cache plugins, then test again.
- If you cannot sign in, rename a plugin’s folder in
wp-content/plugins, for example toplugin-name-off. A renamed plugin does not load. - Purge the cache in your cache plugin and your CDN after each change.
- If the site shows a 500 error after an
.htaccessedit, see how to fix the WordPress 500 error.
Check the SSL certificate and CDN
A site that forces https needs a valid certificate on the server. Behind a CDN, the SSL mode matters too: Cloudflare’s Flexible mode connects to your server over http, so a server that forces https redirects every request, and the loop never ends.
- In cPanel, open SSL/TLS Status and check that your domain has a valid certificate.
- If it does not, click Run AutoSSL, where your host offers it, to issue a free certificate.
- In Cloudflare, open SSL/TLS and set the encryption mode to Full (strict), once the server has a valid certificate.
- With another CDN or proxy, set it to connect to your server over https.
- Purge the CDN cache, clear your cookies and reload.
WordPress hosting with free SSL
HostUpIndia WordPress hosting includes free SSL, so your site can force https without buying a certificate. WordPress comes pre-installed on LiteSpeed, with NVMe storage, cPanel and daily backups kept 30 days.
From ₹149 a month on 3-year billing. Prices exclude 18% GST. See WordPress hosting plans.
- Support tickets and email are received 24 hours a day, 7 days a week.
- Free website migration by our in-house team.
- More help guides.
