How to Track Down and Fix WordPres Redirect Issues & Loops

Redirects can help website owners to maintain a consistent user experience and improve SEO. However, if set up incorrectly, they may cause unexpected issues and hurt both your site's usability and its visibility in search results.

WordPress and many plugins use redirects for different purposes. Problems can occur when multuple plugins try to control redirects at the same time, which can block visitors from reaching your site.

Tracking down an unwanted redirect can be difficult. A common symptom is a redirect loop, where a request keeps being forwarded between URLs and never finishes. This article can help you in finding and fixing not just the redirect loop, but also any unwanted redirections.

HTTP Request

Identifying the Issue

Redirect Sources

In WordPress, redirections can occur due to various reasons including plugins, theme settings, or server configurations.

Server Configuration

One common source of the redirect could be the server settings. If this is the case, identifying its source may be really challenging. As a first step, you should check the NGINX configuration settings or the .htaccess file for Apache servers.

WordPress Core

The WordPress core includes built-in functionality for handling certain types of redirects. If you update the slug of a post or page, WordPress is supposed to handle the canonical redirect automatically. This way, old URLs should still lead visitors to the right place instead of showing a 404 error.

Plugins/Themes

WordPress users have plenty of choices when it comes to redirect plugins. "Redirection" and "RankMath" are among the most popular, offering an easy way to create custom redirect rules and manage 301 redirects.

Likewise, many themes have redirection functions as part of their feature set. For instance, a theme may forward visitors after form submissions or login attempts.

What is a Redirect Loop?

Finding a redirect loop is usually simple, but figuring out why it is happening can be tricky. You can usually tell when it is occurring because the page never fully loads. Your browser keeps redirecting you instead of showing the site content.

Different browsers may show the redirect loop warning in different ways. However, they usually result in an error message. It states that the browser detected too many redirects and that the page cannot be loaded.

Chrome, for example, displays the error code "ERR_TOO_MANY_REDIRECTS". Firefox shows an error message saying "The page isn't redirecting properly", similar to Safari's message "Safari Can't Open the Page".

Redirect loop message

Troubleshooting

Analyzing HTTP Headers

When a visitor opens any page on your WordPress site, their browser must first request the page from your server. The browser sends a request to the server, and the server returns a response with HTTP headers.

They can reveal the redirect type and may contain "X-Redirect-By" headers added by WordPress or a plugin. You can inspect everything directly in your browser's developer tools. You can also use online tools like "HTTP Status Code Checker" or "Redirect Checker".

Here is how to find the HTTP headers using your browser alone:

Chrome

  1. Open DevTools with F12 (or Cmd+Option+I on Mac).
  2. Click the Network tab.
  3. Reload the page, then click any request in the list.
  4. Look at the Headers inside the right sidebar

Chrome HTTP headers

Firefox

  1. Open DevTools with F12 (or Cmd+Option+I on Mac).
  2. Go to the Network tab.
  3. Reload the page, click a request from the list.
  4. The Headers section should appears in the right sidebar.

Firefox HTTP Headers

X-Redirect-By: WordPress

When you are trying to track down a redirect issue, , check for the X-Redirect-By HTTP header. WordPress adds this header automatically whenever it runs a redirect using the wp_redirect() function.

If that header is missing, then the redirect is almost certainly set at the server level (in .htaccess or nginx.conf file). The header is not there because the server triggers the redirect before any PHP or WordPress code is executed.

The X-Redirect-By header clearly indicates that either WordPress core, one of plugins, or your active theme is causing the redirect. By default, the header value reads simply "WordPress." Some plugins, like Yoast SEO or Permalink Manager, replace that default label with their own name instead.

For example, a response might include:

HTTP/1.1 301 Moved Permanently
Location: https://example.com/new-page/
X-Redirect-By: WordPress

HTTP response with "X-Redirect-By" header

Other Methods

Deactivating the Plugins

Redirect loops often happen in WordPress when plugins interfere with each other. For example, one plugin might redirect users to a page while another forces them back.

One way to identify the conflicting plugin is to deactivate them one at a time. On sites with many plugins installed, this can take some time, so alternative solutions might be worth considering.

WP Core Monitor

In case WordPress' built-in functions are the cause of the redirect, you may use a little plugin named WP Core Monitor to track down its source. It determines whether the redirect was caused directly by the WordPress core, a 3rd party plugin or theme.

Using the tool is simple. Just download it from the official Github repository and install it like any other plugin.

WP Core Monitor backtraces the redirectThis plugin will help you monitor and analyze the backtrace data, allowing you to pinpoint the specific function responsible for the redirect. By identifying the root cause, you can make necessary code adjustments or deactivate conflicting plugins to resolve the issue.

Last updated by Maciej Bis on: May 12, 2026.


Maciej BisFounder of Permalink Manager & WordPress Developer

The developer behind Permalink Manager, a plugin for managing permalinks, has been working with WordPress, creating custom plugins and themes, for more than a decade.

Leave a Reply

Your email address will not be published. Required fields are marked *