Wordpress
WordPress Redirect Loops: Find the Conflicting Rule
Trace a WordPress redirect loop from its first 301 to the repeated URL. See a real Playground test and the single-hop result after fixing the conflicting rules.
On this page
A WordPress redirect loop starts when one request returns to an address the browser has already visited in the same chain. Record the requested URL, response code and Location header for each hop. The first repeated address tells you where the cycle closes. Two ordinary-looking rules can produce that cycle even when each works exactly as written.
Two rules, one post and a browser that never gets there
We set up a clean WordPress 7.1.5 site in WordPress Playground with a published post and two deliberately conflicting rules. The first rule sent an old guide address to the post ID. The second was a campaign fallback that sent the post ID back to the old address. Both rules were configured for this local demonstration. WordPress Playground CLI
| Request | Response | Destination | Rule identified in the response |
|---|---|---|---|
/?guide=retired |
301 | /?p=1 |
Legacy guide rule |
/?p=1 |
302 | /?guide=retired |
Campaign fallback |
We disabled only the fallback. The post opened, but the trace exposed another hop: WordPress redirected the post-ID address to its dated permalink. We then changed the surviving rule to point directly to that permalink. The final test took one 301 to reach the post, which returned 200 with the expected title, “Hello world!”

The test rules supplied their own X-Redirect-By labels. On a live site the header may be absent or simply say “WordPress.” Treat it as a clue and confirm which setting produced the response before removing a rule.
Capture the chain before changing settings
Open the browser’s Network panel, enable Preserve log and load the exact failing address in a fresh session. Inspect document requests in order. Include the scheme, hostname, path and query string. A change from HTTP to HTTPS or from a bare hostname to a www hostname can be the entire difference between adjacent rows. A screenshot of the final error page loses that information.
Start with an ordinary public page and then try the affected URL. If only an old campaign path loops, inspect the rules for that path first. If several unrelated pages alternate between the same two hosts, compare the host selected by the CDN or web server with the public address WordPress is configured to use. On sites where the WordPress files live in a subdirectory, the WordPress Address and Site Address can legitimately differ. WordPress directory configurations
When the address appears to redirect to itself
HTTPS can terminate at a reverse proxy while WordPress receives HTTP internally. If the application decides it must upgrade the request to HTTPS again, the browser may keep receiving the same public HTTPS address. Check how the trusted proxy communicates the original scheme to WordPress. The WordPress handbook describes this configuration. Have the host verify what its own proxy sends before changing production settings. WordPress HTTPS configuration
Repeat the original request after changing one setting on staging. Keep the winning destination explicit and check its title or content as well as its status. A home page returning 200 would still be a poor landing page for an old installation guide. Finally, run the same test against the public address after deployment so any redirect cached at the edge is included. WordPress 301 redirect setup · How to diagnose an extra redirect hop
