rawatweb

WordPress Redirect Loop: When the Page Will Not Open

Browser says too many redirects? Understand the sources of redirect loops in WordPress—SSL, plugins, cookies, and server rules—then break them safely.

Editorial illustration of arrows looping endlessly between two servers.

The site will not open. The browser reports too many redirects, or the page flickers and stops. The admin area is unreachable too, so repairing from inside WordPress is not an option.

A redirect loop is a state where a request bounces back and forth and never reaches its destination. The server redirects to address A, A redirects to B, and B sends it back to A. The browser gives up after a few hops.

Short answer: a loop always involves two rules that contradict each other. Usually one forces HTTPS while another forces HTTP, or two different settings rewrite the domain and path in opposite directions. Find both ends, then let only one rule act.

Reading the redirect chain

Before changing anything, see where requests actually go. The clearest method: open developer tools, switch to Network, reload, and inspect each request’s status. A 301 or 302 response carries a Location header with the destination.

For longer chains, use the command line:

curl -I -L --max-redirs 10 https://yourdomain.com

Each block shows a status code and the next destination. From the first two or three hops the pattern is usually obvious: https:// to http:// and back, or domain.com to www.domain.com and back.

Write the chain down. It is invaluable when you change configuration and need to compare before and after.

Wordpress redirect loop: Cause one — HTTPS and HTTP colliding

The most common case: one party forces HTTPS while another forces HTTP.

Examples:

  • .htaccess contains a rule redirecting to HTTPS.
  • A plugin or hosting setting forces HTTP because it thinks SSL is not active.
  • A CDN runs in flexible SSL mode, sending requests to the origin over HTTP, where the origin redirects back to HTTPS—and the CDN repeats it.

In cases like this—including the one covered in mixed content after SSL—the loop happens outside WordPress. The sign: the site fails before any page loads, and WordPress logs show no incoming request.

The fix: pick one source of truth. If SSL is active and working, force HTTPS in exactly one place, and make sure the CDN forwards HTTPS to the origin.

Cause two: domain and www

The combination of domain.com and www.domain.com is a classic loop source. A server rule may redirect www to non-www while WordPress settings do the opposite—leftovers from an incomplete hosting move. A wordpress redirect loop between domain and www clears once the server and the database agree on one address.

Check two places:

  1. siteurl and home in the database—do they use www or not.
  2. Server redirect rules—are they consistent with that choice.

A COOKIE_DOMAIN naming a different domain can also break sessions, which in some configurations leads to repeated redirects to the login page.

After choosing one canonical form, apply it consistently: site address, server rules, canonical tags, and Search Console registration.

Wordpress redirect loop: Cause three — plugins overriding each other

SEO plugins, security plugins, and redirect plugins often ship their own redirect features. With two active and configured in opposite directions, the result is a loop that is hard to trace because both run inside WordPress.

Signs: the loop affects specific URLs only, or appeared right after installing a plugin. Other pages may be fine.

To confirm:

  1. Disable plugins through the file manager by renaming their folders, or via the database if admin is unreachable.
  2. Reload the page and see whether the loop stops.
  3. Reactivate one at a time until it returns.
  4. Adjust settings so only one plugin handles redirects.

Never let two plugins manage the same job. The same applies to caching, image optimisation, and security.

Cause four: database settings

If admin is completely unreachable, database repair is an option. Several values can trigger loops:

When a wordpress redirect loop survives every plugin being off, check the siteurl and home values in the database.

  • siteurl and home not matching the address you visit.
  • home pointing to a different path, such as a subdirectory no longer used.
  • Redirect plugin options storing an old destination.

Before editing, back up the wp_options table. A small change here can take the site down entirely, so a backup is a requirement, not a preference.

Where WP-CLI is available, wp option get home and wp option update home 'https://domain.com' are safer because results can be verified immediately.

Breaking a loop safely

When the site is truly unreachable, this order is safe:

  1. Disable all plugins by renaming the plugins folder to plugins-off, then creating an empty plugins folder. WordPress will see no active plugins.
  2. Reload the site. If it works, the cause is a plugin. Reactivate one at a time.
  3. If it still loops, inspect .htaccess and save a copy before editing.
  4. Switch to a default theme by renaming the active theme folder.
  5. Check the CDN settings and its SSL mode.

Once the site is alive, restore components one by one. It is slower, but every step yields information—and that information is what prevents a repeat.

Inspecting .htaccess

.htaccess is the most common hiding place for conflicting rules. Open it and look for:

  • RewriteRule lines redirecting to https:// or http://.
  • Rules changing www.
  • Redirects left behind by an old plugin.
  • Blocks generated by cache or security plugins.

Save a copy before editing. For a quick test, rename the file to .htaccess-off and create a new .htaccess containing only the basic WordPress block. If the site works, restore sections one by one to find the offending line.

On Nginx, these rules live in the server configuration and cannot be edited from the file manager. Contact the host if that applies.

Redirects from third parties

Loops sometimes originate outside the site:

  • A CDN with the wrong SSL mode.
  • A corporate proxy rewriting requests.
  • A security service redirecting to a challenge page.
  • Registrar-level domain redirects conflicting with server rules.

To separate these, test from another network and without a proxy. If the loop disappears, the cause is on that path. If it persists, check the CDN configuration.

Prevention after recovery

  1. One redirect source only. Choose server or plugin, never both.
  2. Document the domain and protocol choice, including for other team members.
  3. Test after SSL changes and after switching CDNs.
  4. Avoid stacking SEO plugins with overlapping features.
  5. Keep a copy of .htaccess before editing anything.

For sites whose configuration changes often, a short note on “who redirects what” saves hours later.

Loops on a single page

A loop does not always take down the whole site. Sometimes only one page, category, or product cannot be opened while everything else works. That pattern narrows the cause quickly.

Possibilities to check:

  • Per-page redirect rules stored by an SEO plugin, pointing a page at itself.
  • A changed slug, where an old rule still points at an address that now redirects back.
  • A custom page template forcing a redirect in template_redirect.
  • Categories or tags whose settings were edited manually and now conflict with canonical rules.
  • Products with variation rules redirecting to the same URL with different parameters.

To find it, note the failing URL and compare it with a similar page that works. A small difference in slug, status, or template usually points at the cause.

If the loop only affects signed-out visitors, review access-related rules such as member pages or restricted content. Often two rules each believe the visitor belongs somewhere else.

The repair is the same: reduce to one rule, test, then document the change so it does not return after a plugin update.

Wordpress redirect loop: what matters first

A redirect loop happens when two rules point at each other: one forces HTTPS while another forces HTTP, or two settings change the domain differently. Trace the chain by reading the Location header on each response; a loop usually shows itself within two or three hops.

Frequently asked questions

Is a redirect loop caused by malware? Usually not. It is conflicting configuration, though malware can inject redirects. Check configuration first.

Why does the loop only affect admin? Usually because siteurl differs from the address you visit, or cookies do not apply to the admin path.

Does clearing cache fix a loop? Rarely. Cache can make it worse, but the loop comes from redirect rules.

Is it safe to delete .htaccess? For testing, renaming is safe as long as you keep a copy. WordPress regenerates basic rules when permalink settings are saved.

If the site is completely unreachable and you have no file manager access, recovery is faster with direct help. Website emergency support handles cases like this, while a free audit maps overlapping redirect configuration so it does not recur. Preventive work of this kind is part of monthly website care.

Read next: Images Blurry After Uploading to WordPress: Why and How to Fix, WordPress Sitemap Errors in Search Console: Fix Order, WordPress Keeps Logging You Out: Why Sessions End.

#redirects #ssl #htaccess #cache
Let's talk about your website

Does any of this look like your website?

Tell us on WhatsApp. We look first, explain what needs fixing, then you decide. For a fuller picture, request the free audit.

Chat with us