What is happening
Your browser shows "This page isn't working. yourbusiness.in redirected you too many times" (Chrome shows ERR_TOO_MANY_REDIRECTS). Browsers follow a limited number of redirects and then give up. A loop forms when, for example, the server sends http:// to https:// while a CDN or plugin sends https:// back to http://.
This article is for your own website. Typical triggers are installing an SSL certificate, adding a CDN, changing the domain, or turning on a redirect plugin.
Steps to fix it
-
Clear cookies for the site only, then reload in a private window. If the loop disappears, a stale cookie was the cause and you can stop here.
-
Trace the loop to see which addresses repeat:
curl -sIL https://yourbusiness.in/ | grep -i -E "^(HTTP|location)"Or open the browser's developer tools (F12), choose the Network tab, tick Preserve log and reload. The
Locationvalues show the pattern, such as http to https to http, or from www to non www and back again. -
Check the CDN SSL mode if you use one. With Cloudflare, the Flexible mode connects to your server over plain HTTP; combined with an HTTPS redirect on the server, that loops. Switch to Full (strict) once your hosting serves a valid certificate. ODHOST shared plans include a free SSL certificate you can use for this.
-
Fix WordPress URLs. In Settings > General, both "WordPress Address (URL)" and "Site Address (URL)" must use the same scheme and host, for example
https://yourbusiness.in. If you cannot reach the dashboard, add these lines towp-config.phpabove the "That's all, stop editing" line:define( 'WP_HOME', 'https://yourbusiness.in' ); define( 'WP_SITEURL', 'https://yourbusiness.in' ); -
Remove duplicate HTTPS redirects. Keep exactly one place that forces HTTPS. Candidates are:
- cPanel Domains, the "Force HTTPS Redirect" toggle
- cPanel Domains > Redirects
- Rules in
.htaccess(look forRewriteCond %{HTTPS} off) - A WordPress SSL or redirect plugin
- In Plesk, the "Permanent SEO safe 301 redirect from HTTP to HTTPS" option in hosting settings
A typical single rule in
.htaccesslooks like this:RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] -
Align the www and non www versions. If WordPress says
https://www.yourbusiness.inbut a rule redirects www to the bare domain, they will loop. Make every setting use the same version. -
Handle proxies in code. If the site sits behind a CDN or load balancer that terminates SSL, WordPress may think the visit is HTTP. The WordPress HTTPS documentation shows how to read the
X-Forwarded-Protoheader inwp-config.php. Add it only if you are behind such a proxy.
How to confirm it worked
- The
curl -sILcommand ends with a singleHTTP/... 200line. http://,https://,wwwand non www versions all end up at your one chosen address.- You can log in to
/wp-admin/without being bounced back.
Once the loop is gone, check the padlock; if the browser still warns, see fixing "not secure" and mixed content.
If it still fails
Open a support ticket and include:
- The URL and the output of the
curl -sILcommand, pasted as text - Whether you use a CDN or proxy, and its SSL mode
- Your WordPress Address and Site Address values
- Which redirect settings and plugins you have turned on
- When it started and what changed just before (IST)
For other symptoms, see troubleshooting common hosting errors.
Frequently asked questions
Why does clearing cookies sometimes fix it?
Some sites set a cookie that decides where to send you, such as a language or login cookie. If that cookie is stale, the site can keep redirecting you. Clearing cookies for that one site removes it.
My site uses Cloudflare. What setting causes loops?
The Flexible SSL mode connects to your server over HTTP. If your server then redirects HTTP to HTTPS, the two loop forever. Use Full (strict) once your hosting has a valid certificate.
Should I use www or non www?
Either is fine. Pick one, set it in WordPress and in your redirect rules, and redirect the other version to it.
Can I fix it if I am locked out of wp-admin?
Yes. Define WP_HOME and WP_SITEURL in wp-config.php, which overrides the database values, or edit siteurl and home in the wp_options table with phpMyAdmin.