How to Change the Category URL Base in WordPress using Rank Math SEO Plugin

Photo of author

By Shrey Kajaria



Do you want to change the URL pattern of your indexed category pages without losing any SEO and rankings in SERP?

If so, then you are in the right place. 

Generally speaking, the process of changing the URL slug of a page, category, and custom post type is a little complicated as WordPress only redirects the URLs of the posts by default.

But take it easy. This guide will introduce you to a top-notch WordPress SEO plugin, named Rank Math and show how you can change any URL of your site without losing any SEO score as well as visitors.

So, close all the distractions, take a cup of coffee, and follow this step-by-step guide thoroughly. 😄

Why Do We Change the URLs of Pages, Posts, Categories, and CPTs? 

Well, we don’t change the URLs unnecessarily.

Whether it is a blog, e-commerce site, news website, business website, or personal portfolio, we face certain cases that force us to change the URLs.

Here are some solid reasons for changing the URLs:

  • URLs could be changed based on a marketing strategy or branding,
  • For SEO purposes or to enhance user experience,
  • Sometimes URLs are changed when the content is relocated or updated freshly on a new destination,
  • URLs are often edited according to the changes in a website structure.

Issues after Changing or Deleting The URLs?

But there appears a significant glitch regarding SEO, that prevents gaining the top position in Google’s SERP (Search Engine Results Page)

Issues after changing the URLs:

Both your users and search engine crawlers get affected negatively after changing and deleting the URLs.

  1. Crawlers don’t like 404 Page

If you are bringing search engine crawlers and bots to a 404 page, in the context of crawling, it will hamper your SEO.

  • Let’s suppose, here is a page: “”.

And you have linked this URL to multiple sites and different locations. Then later on deleted this or changed the URL slug to “”.

Now, when a crawler wants to crawl and reach the real page, it will only land on the 404 page. 

Crawlers don’t like this as wrong URLs waste their resources and bring crawlers to a 404 page and your whole SEO gets hurt.

  1. High Bounce Back Rate:

Irresponsibly changing your URLs will redirect users to 404 pages

  • It means if a user lands on a 404 page, that person will not get any content and is likely to leave that page.

Consequently, it will cause a high bounce-back rate. Also, Errors and blank pages reduce User Experience.

So, we must need a solution.

Solution for 404 Pages: 301 Redirection?

Here is the best and only solution for this i.e. 301 Redirection.

First, we will explain about 

  1. Redirection
  2. Types of Redirection
  3. 301 Redirections and how to do it.

What is Redirection?

Redirection is a way to send a crawler or user from a URL that is temporarily or permanently unavailable to the destination URL we want.

  • We already told you why we change or delete a URL and why a 404-Page issue occurs.

Now if you want to fix this issue, we have to use Redirection in order to send crawlers as well as visitors to forward them from a URL that is temporarily or permanently down 

Here are Some Massive Reasons to do Redirections:

  1. No Bounce Back: It is always better to forward your users from an existing page or post rather than showing “404 This Page Doesn’t Exist”.

Users will get some content to spend their time on, which will not cause a bounce back.

  1. Happy Crawlers: Through Redirections, you can tell search engine crawlers which page has been replaced and which is the destination page.
  1. 99% Link Value Retained: When you use 301 Redirection and do redirections, you don’t lose any page authority of that old page.

The authority or link value gets transferred to the redirected page.

Types of Redirection?

There are two major types of Redirection:

  1. 301: Permanent Move: when a page is permanently moved to a new location, 
  1. 302: Temporary Move: When we temporarily move one page.

There are some other types of Redirection, such as 

  • 307:  Temporary Redirect,
  • 410: Content Deleted,
  • 451: Content Unavailable for Legal Reasons Redirection,
  • 303 See Other.

Redirection with Examples?

Let’s suppose we use WordPress as a CMS platform and want to change the URL pattern of some category pages.


For this tutorial, I’m going to use my fellow blogger friend’s website ““. Big shout out to him.







And these category pages are also indexed in search results and drive organic traffic

  • We want to change the URL pattern to ensure it is more aligned with their website’s strategy and target audience and most importantly, make sure that we will not lose any SEO value and visitors.

Want to know how to do that? 

Read further. 😊

How to change the URL Patterns without losing your SEO score? 

Though there are many ways and tools to change the URL Patterns.

  • Rank Math: 
rank math seo

But, here we will use a top-level WordPress SEO plugin, called Rank Math, built on cutting-edge technology, that has a tone of features that comes absolutely free of cost.

With the help of the Rank Math SEO plugin, you can do redirections very easily in no time as it has multiple features such as 

  • Debug Redirection
  • 404 Monitor
  • Redirection Type 
  • Auto Post Redirect
  • Breadcrumbs Function, and many more.

How to use Rank Math to change the URL slug?

So these are our three category pages:

How to use Rank Math to change the URL slug

These are the three URLs:

change category url base in wordpress
change category url base in wordpress
change category url base in wordpress

❗We Want to Change the URLs❗

To make the URLs of category pages more user-friendly and more aligned with our website strategy and target audience, we want to change the URLs of these category pages.

We want to change the Category Base, from “category” to “topics”.

Also, we don’t want to lose page authority or link value.

How to Change the Category Base?

Before anything else, first, we will change our Category base name, from Category to Topics.

By default, the Category base name was.

change category base in wordpress

After that, it is 


Now, if you revisit your old category URL, you will see a 404 Error.

38qUSH4HUwFNNG7YxaiLKN2TekrAMs5pbCf6zPA9ZJBhE1bTjifIaC8wd 43QQ7cY8dtKaV97tyq2oU7rPBaqNhd9zbFFSQogU5yQfKz53ujN3lj1guIOCygnvZ H9jeKNr9EB79HOkITRDRCyeQPpY

Now, imagine you are changing the URL pattern of your category pages on a Google-indexed site that is live on Google.

What will happen?

  • This will badly affect your site in SEO, Traffic, and User Experience as well.

Change The URL Patterns of Your Category Page by RankMath?

Now we are going to use RankMath to set redirection.

Why Use RankMath for Redirections:

  • RankMath’s User Interface is so user-oriented and straightforward that even a non-techy can set up redirection without any hassle. 
  • RankMath offers built-in redirections modules for free that lets users operate every URL Redirection efficiently.
  • Moreover, setting up redirects for individual URLs, patterns, and keywords becomes effortless as users will not have to work with Regular Expressions.
  • Users get several useful redirection options on RankMath that make adding source URL, and destination URL, and applying redirection type real quick.

How to Use RankMath for Redirections?

First, you have to 

  • install and activate the Rank Math SEO plugin,
install rank math seo plugin
  • Then click on the Dashboard section that is just after the Rank Math,
install rank math seo plugin
  • Now click on Advanced Mode, in the top right corner.
rank math advanced settings
  • Now scroll down until you get to the Redirection module. Activate it and click on Settings.
rank math redirections
  • You will get all the Redirection module’s options. 
  • Scroll down and choose the redirection type.
  • Here we will choose 301, as we want to move permanently.
  • Lastly, enable the Auto Post Redirect option to let Rank Math auto redirects all of our posts, pages, and category pages.
create redirection in rank math
  • Now click on the Save Changes button.

Now, whenever you change any URL slug, Rank Math will immediately notify you and will provide all the details and history of your old URLs and new URLs.

seo notice

You can check the history of these redirections in the Redirections option.

Not only that you can also edit and update those redirections in your own way.

Now we are going to add redirection

For that, you have to 

  • Firstly, Click on the “Add New” redirection,
  • Copy this “^category/(.*)” into the source URL section,
  • Select Regex out of these 5 options,
  • Then in the destination URL https://krishnanath/topics/$1 

(Add your domain name here) 

  • Then click “Add Redirection”.

Here you can see the screenshot.

create regex redirection in wordpress

If you just scroll down, you can see the Redirection history here.

rank math redirection

Now if you click on the old category link, it will automatically be directed to the new one,

Why Apply Regex Redirection for Changing The Category Page URL Redirection?

The full form of Regex is a Regular Expression.

Regex redirection plays a mighty role when managing a larger number of URLs that have similar patterns.

Here are some reasons when and why we should apply Regex Redirection:

  • Redirecting multiple Web URLs is a complex process. Now, using Regex users get greater control and flexibility over matching URLs 
  • Regex Redirection has the power to control several cases. For instance, redirecting similar patterned URLs to a particular URL.
  • In addition, Regex handles 
  • Dynamic URLs, 
  • URLs that vary query string parameters,
  • Parameterized URLs.


Redirection plays a major role when you delete or edit your URLs. Not only it saves your SEO and link value but also maintains the User Experience.

Now, WordPress only auto-redirects the posts, not the pages. Hence, you need a powerful tool.

Thanks to the Rank Math SEO plugin, that lets you do any type of redirection easily in a moment. Moreover, you get this feature absolutely for free.

So, all the credit goes to the Rank Math plugin. Thus, install RankMath, and make the most of it.