Redirection plugin and redirect loops

Author: Denny Brown Last modified on: October 6, 2018 11:04 pm
Share this post...

On many of our sites, we use a plugin called Redirection. You can find it at Plugins > Redirection.

It enables you to easily redirect one URL to another. There is a screen from which you can create new redirect commands and edit existing ones. That screen is at Tools > Redirection.

That first screen is the “create new” screen. To see what you already have, click on the Groups link. That brings up a list of redirection groups. Normally there are two groups: Redirections and Modified Posts.

The good news is that the plugin automatically creates one of these entries in the “Modified Posts” group if you modify the URL that reaches a page or post. So, for example, if you changed “sample-page” to “example-page”, it automatically creates a redirection.

The bad news is that you can create a redirect loop. If somebody changes the URL from “example-page” back to “sample-page”, that will create another redirect entry. Then you will get a “server error” that says that the server noticied that “sample-page” was being redirected to “example-page” and then “example-page” to “sample-page” and then … forever.

The fix is to go to Tools > Redirection >> Groups >> Modified Posts. That has the list of all of the redirections that have been created when this kind of change happens. Use the search box on that page to find only the ones you’re interested in. Then delete any of them that are redirecting away from the page you want the visitor to see.

The automatic creation of redirects feature is a very useful one. Most of the time it works very nicely. But you do have to be careful to stay out of loops or know how to fix the problem when it appears.

Leave a Reply