If you see redirects that you’ve not configured yourself, there can be many causes of the problem.
Rank Math is not the only plugin that can control the redirection of your website. Other plugins installed on your website can also add redirection rules to the .htaccess file. Hence to fix the problem, we need to identify — what causes these redirections.
Solving the Redirection Issue
In this knowledgebase article, we’ll identify the issue causing unexpected redirections and fix them. To get started, follow our step-by-step process to troubleshoot this issue.
Table of Contents
1 Check for Other Redirection Plugins Installed
First, check if you have any other redirect plugins installed that have configured any redirects. If you find any, delete them immediately. Then, check your posts (preferably from a new browser) to see if the problem is resolved.
2 Check .htaccess (or) nginx.config File
Next, check your .htaccess (or nginx.conf) file if any redirects have been created there. You can check the .htaccess file in your WordPress dashboard with the Rank Math plugin. To check the redirection rules set up in your .htaccess file, navigate to WordPress Dashboard > Rank Math > General Settings > Edit .htaccess.
If you see any additional redirection rules being set up, delete them and check if the problem is resolved.
Fair warning: Before making any changes to the .htaccess file, understand that any accidental mistakes with the .htaccess can break your website. Considering this, Rank Math creates a backup of your last saved version of the .htaccess file before the edit. Then, if anything goes wrong with the changes you’ve made to the file, you can restore this backup with FTP.
To delete any rules from the .htaccess file, select the checkbox below the warning and remove the redirection rule causing the issue from the .htaccess file.
And then click the Save Changes button.
Now check if the redirection issues are fixed; if it doesn’t resolve, proceed with the next step.
3 Check for Redirections Created with Rank Math
If you’ve manually created redirects using Rank Math’s redirection option, it is a good idea to check if you’ve accidentally created “broad redirects”. Rank Math offers plenty of advanced options to create redirects, and misconfiguring any redirect might cause issues throughout your website.
Open the recently created redirection inside Rank Math and look through its settings. Here is an example.
There are a few things to note here that might help in resolving the issue.
- Each redirect can have multiple options configured in it. So, it might look like only 1 redirect is taking place, but you might have configured multiple URLs inside Rank Math, which might cause the problem.
- Rank Math offers various matching options to give you immense flexibility in creating redirects. You can see an example image below, which shows all the options.
As you can see, many Source URLs could have been added that will cause more than 1 URL to be redirected to a destination URL.
To find the root cause of the problem, check all the redirections you’ve created since the error started and verify if any redirects have problems. Once you fix those issues, check to see if the troublesome redirects have disappeared.
4 Theme or Plugin Conflict
Sometimes, a conflict between plugins or themes can cause serious issues to the entire website. This might lead to unwanted 301 redirects or even put you on a redirect loop.
In such cases, you might need to perform a quick conflict check on your website. Before running the test, ensure that you have taken a complete backup of the entire site so that if anything happens during the conflict check, you can still restore it at any time later.
Once you’ve enabled the Troubleshooting mode, disable Rank Math and check whether any random redirections are still happening. If you are unable to find any, then try disabling other plugins one by one and check for unexpected redirections. In most cases, redirection can happen due to other plugins, or even caused by the theme which you use at present.
And, that’s it! We hope the tutorial helped you to fix the redirection issue. But, if you’re still facing issues, please open a ticket on our support forum, and our support team will help you in the best way they can.