How to Change the Category Base Prefix in WordPress

How to change Category base prefix in WordPress

Are you willing to change the category base prefix in WordPress? WordPress uses the default link structure for categories on your website. The link looks something like this: domain.tld/category/category-name. Here, the category is the base prefix for the link.  However, you can always change the category base prefix in WordPress, and in this article, we’re going to show you how you can easily do that.

But before we begin, here’s a short description for those who don’t know about the category base prefix and if you should change it.

What is Category Base Prefix?

Every category on your website has its own page and RSS feed. You can view all the posts that are situated under a certain category by visiting the archive page of that category.

Every time you create a category in WordPress, you create an archive page for that category. By default, WordPress adds a category base of /category/ to the URLs of all category archive pages. It helps to differentiate pages and posts from category and tag archives.

For example, if you have a category called “Tutorials” then its URL will look like this:

http://example.com/category/tutorials/

Why you should Change the Category Base?

Not every website needs to change the base prefix. If it’s the general website then you don’t need to change it. But if your website is for a particular niche where you want to use the focus keyword as the category base then can need to change the category base prefix to reflect that.

However, if you are creating a niche site where you would like to use a different word or phrase for your categories, then you can change the category base prefix to reflect that. Once you have this updated SEO-friendly URL structure, it will help your users and search engines to understand your website better.

Having said that, let’s see how you can change the category base prefix in WordPress.

How to Change Category Base Prefix in WordPress?

It is quite simple in WordPress to change category base prefix. First, you need to visit the settings page in your WordPress dashboard. Go to Dasboard => Settings => Permalinks page and scroll down to the bottom of the page in Optional section.

Here you can enter the prefix that you would like to use next to the category base option. You can also change the tag base prefix if you want. Finally, click on the Save Changes button.

Note: It is very important for the existing site to set up redirection after changing the category base. This will help the Search Engine and your visitor to land on the new URL when they visit the old URL which will be a 404 error page.

How to Setup Redirection?

In order to redirect Search Engine and your visitors to the new category page, you will need to set up a redirect and make sure both search engines and regular visitors are properly redirected to the correct category page on your site.

Use Redirection Plugin

The Redirection plugin is one of the most popular redirect managers for WordPress. With it, you can easily manage 301 redirections, keep track of 404 errors, and generally tidy up any loose ends your site may have. This can help reduce errors and improve your site ranking.

To install this plugin from your Dashboard, go to “Plugins => Add New” and in Search Box, type in “Redirection” and enter it. It will show the Redirection plugin, click on the “Install Now” and then “Activate” button.

After activating the Redirection plugin, go to redirection plugin setup page from Tools => Redirection. For the first time, it will show you the Redirection plugin welcome page with instructions. After reading that, click on the “Start Setup” button, use the settings are per your need. We recommend you check “Monitor permalink changes in WordPress posts and pages” and click on the “Continue Setup” button and click on the “Finish Setup” and “Finish” buttons.

Now, Scroll down to “Add new Redirection” section. As we are redirecting the Category base, we need to use “Redirect Regular Expressions“.

Now, you need to add /category/(.*) in the Source URL field. Now you need to enable a regular expression match in Redirection, so select “Regex” in the URL options / Regex field. After that, type in your new category base prefix /topics/$1 in the Target URL field. Finally, click on the Add Redirection button to redirected all your visitors and search engines to the correct URLs using your new category prefix.

Well, that’s all there is. Did this short tutorial help you change the category base prefix in WordPress? Let us know through the comments section.

Source: WP Beginner

3 thoughts on “How to Change the Category Base Prefix in WordPress

  1. vitor wellichan says:

    in the tutorial there was a blank space in the string “/category/ (.*)”
    should be “/category/(.*)”

    thx

    Reply

Leave a Reply

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