ERR_TOO_MANY_REDIRECTS
Your browser shows "This page isn't working. example.ca redirected you too many times." (Chrome and Edge, ERR_TOO_MANY_REDIRECTS) or "The page isn't redirecting properly" (Firefox). Two rules are sending visitors back and forth forever.
Symptom, cause, fix
| Symptom | Likely cause | Fix |
|---|---|---|
| Began after you turned on Cloudflare | Cloudflare SSL mode is Flexible, while your site forces HTTPS | Section 1 |
| Began after adding an HTTPS redirect | A redirect rule conflicts with another, or a plugin forces HTTPS too | Section 2 |
| Began after switching between www and no www | Two rules fight each other | Section 3 |
| Began after changing the site URL in WordPress | URL settings don't match your redirects | Section 4 |
| Only some browsers fail | Stale cookies or cached redirect | Section 5 |
| After a migration or restore | .htaccess carries rules from the old setup |
Section 2 |
1. Cloudflare SSL mode
If your site uses Cloudflare and redirects HTTP to HTTPS, Flexible mode loops. Cloudflare talks to your server over HTTP, your server redirects to HTTPS, and Cloudflare asks again.
- In Cloudflare, go to SSL/TLS → Overview.
- Choose Full (strict). You need a valid certificate on the Barbrick side. See Free SSL with AutoSSL.
- Purge Cloudflare's cache, then test in a private window.
See Use Cloudflare with Barbrick hosting.
2. Check .htaccess for conflicting rules
- Open Account → Hosting → your site → Files → File manager and open
.htaccessin your site folder. Copy it first. - Look for more than one rule that redirects HTTP to HTTPS or non-www to www. Keep only one set.
A correct HTTPS redirect looks like this.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]
If your site sits behind a proxy or Cloudflare, the server may not see HTTPS as on. Use this form instead.
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]
- Save, and test. If still looping, rename
.htaccessto.htaccess-off. If the loop stops, the cause was in that file. In WordPress, save Settings → Permalinks to rebuild the standard block.
See Force HTTPS for your site.
3. www versus non-www
Pick one and redirect the other to it. Choose one of these, not both.
Send www to the bare domain.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.ca$ [NC]
RewriteRule ^(.*)$ https://example.ca/$1 [L,R=301]
Send the bare domain to www.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.ca$ [NC]
RewriteRule ^(.*)$ https://www.example.ca/$1 [L,R=301]
Also check the domain's settings under Account → Hosting → your site → Websites → Domains, where a redirect may exist. See www or no www.
4. WordPress URL settings
Go to Settings → General. WordPress Address and Site Address must match the version you redirect to, for example both https://example.ca. If you can't reach wp-admin, set them in wp-config.php.
define('WP_HOME', 'https://example.ca');
define('WP_SITEURL', 'https://example.ca');
See Change a WordPress site's URL. Also check for an SSL or redirect plugin that forces its own redirect. Turn it off while you test. Use one place for the HTTPS redirect.
5. Browser cache and cookies
Redirects are cached by browsers. Test in a private window, or clear cookies and cached files for your site.
6. Domain-level redirects
Check Account → Hosting → your site → Websites → Redirects for a rule such as http://example.ca to https://example.ca set in addition to .htaccess. Delete duplicates. See Redirect a page or domain.
Test where the loop is
On a computer with a terminal:
curl -sIL --max-redirs 8 http://example.ca | grep -iE '^(HTTP|location)'
You'll see a list of statuses and location: lines. A loop shows the same two addresses repeating. The one that doesn't end shows which rule to fix.
Still stuck?
Send the output of that command and your .htaccess. See What to include when you ask for help.
Still stuck? Ask us and we'll walk you through it.