1. Home
  2. Knowledge Base
  3. Random URLs Redirecting Even When No Redirect Was Created

Random URLs Redirecting Even When No Redirect Was Created

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 we’ll fix them. To get started, follow our step-by-step process to troubleshoot this issue.

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 right inside your WordPress dashboard with Rank Math plugin. To check the redirection rules set up in your .htaccess file, navigate to WordPress Dashboard > Rank Math > General Settings > Edit .htaccess.

Rank Math - 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. However, if you make multiple changes that cause problems, the backup cannot help you. So proceed with caution.

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.

Remove redirection rules causing errors

And then click the Save Changes button.

Save Changes

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 URL inside Rank Math and look through its settings. Here is an example.

Redirection options available in Rank Math

There are a few things to note here that might help in resolving the issue.

  1. 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 and that might be the cause of the problem.
  2. 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.
Redirection - Source URL 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.

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.

Still not using Rank Math?

Setup takes less than 5 minutes including the import from your old SEO Plugin!

Know more about the PRO Version

Was this article helpful?

Still need help?

?

Submit Your Question

Please give us the details, our support team will get back to you.

Open Ticket