Do you wish to modify the category base prefix that is used in WordPress?
Every category page’s URL will have /category/ appended to the beginning of it if you use the default settings for WordPress. You are however free to modify the category base prefix in any way you see fit or even eliminate it entirely.
In this tutorial, we will walk you through How to Change the Category Base Prefix in WordPress?
What is Category Base Prefix? Should You Change It?
Your WordPress site will provide individual pages and RSS feeds for each category that you create. You may see all of the posts that have been filed under a category by going to the archive page for that category.
WordPress creates URLs for category pages with the word “category” appended as a base prefix by default. This helps identify pages and articles from archives associated with categories and tags.
For instance, if you have a category that is titled “News,” then the URL for that category will look something like this:
In a manner analogous to this, WordPress appends tag prefixes to the URLs of tag archives.
Users and search engines both benefit from this search engine optimization-friendly URL layout since it clarifies the nature of the website they are viewing.
The base prefix does not typically need to be modified on the vast majority of websites. On the other hand, if you are developing a specialized website and would like to use a different term or phrase for each of your categories, you can modify the category base prefix so that it reflects the new word or phrase.
Changing Category Base Prefix in WordPress
Altering the category base prefix in WordPress is a very straightforward process.
You will need to go into your WordPress account, navigate to the Settings » Permalinks page, and then scroll all the way down to the “Optional” area.
You have the ability to input the prefix that you would want to use next to the category base option in the area labeled “Category base.” Altering the prefix of the tag base is another option available to you.
For instance, you could use “topics” as the new prefix for the phrase. In this scenario, the URLs of your categories will look something like this:
Make sure you click the “Save Changes” button in order to permanently store your preferences.
Removing Category Base Prefix from URLs
Many of our users have inquired as to whether or not it is possible to eradicate the category base prefix from WordPress URLs entirely. Your category URLs will be updated to look like this as a result:
It is not a good idea to do this, and we strongly suggest that you do not remove the category base prefix.
The category base prefix provides users and search engines with an improved ability to differentiate between posts and pages and categories. The ambiguity introduced into your URLs by removing the prefix is detrimental to both the user experience and the search engine optimization of your WordPress site.
You could potentially experience certain technical difficulties with the use of several WordPress plugins. For instance, if you have a category and a page with the same name, or if you use percent post name percent as the structure of your URL for single posts, then your website will encounter an infinite redirect loop, which will result in the pages not loading at all.
Having said that, you can use the All in One SEO (AIOSEO) plugin in the event that you still intend to accomplish this.
Your website will have a much easier time being optimized for search engines if you use this plugin, which is the best one available for WordPress. In addition to this, it enables you to easily remove the category base prefix by only requiring the click of a button.
For the sake of this tutorial, we will be utilizing the AIOSEO Pro license because it comes equipped with the capability to delete category bases in addition to other potent capabilities such as the redirection manager and the link helper. You can also utilize a version of AIOSEO that is completely free of charge.
Installing and activating the AIOSEO plugin is the first step in this process. Please refer to our tutorial on how to install a WordPress plugin for additional information and specifics.
After activation, the AIOSEO setup process will appear before your eyes. To begin, just click the icon that says “Let’s Get Started.” For additional information, please refer to our step-by-step guide on how to configure All in One SEO for WordPress.
When you are finished, you need to ensure that you click the button that says “Save Changes.”
Setting Up Redirects After Changing Category Base Prefix
If you are modifying or removing the category base prefix on a brand-new WordPress website, then there is nothing else that you need to do. If you are doing this action on an already-existing website, however, users who navigate to the previous category page will be met with a 404 Not Found message.
You will need to set up a redirect in order to remedy this issue. This redirect will ensure that both search engines and regular visitors are sent to the appropriate category page on your website in the correct manner.
Using the All in One SEO (AIOSEO) plugin is going to make the process of redirection configuration in WordPress significantly simpler.
From the WordPress admin panel, navigate to the All in One SEO » Redirects menu, and then click the ‘Activate Redirects’ option. This will get the process started.
When it is ready to use, navigate to the ‘Redirects’ tab to configure the redirection settings.
Simply put the URL you wish to redirect into the section labeled “Source URL,” and then add the new destination for the link into the field labeled “Target URL.”
You have the option of selecting “301 Moved Permanently” from the dropdown menu when it comes to the Redirect Type. This will migrate all of your previous category pages to the new location in a permanent manner.
Conclusion: How to Change the Category Base Prefix in WordPress
When you are finished, you must ensure that you click the button labeled “Add Redirect.”
Now that you have implemented your new category prefix, all of your users and search engines will be sent to the appropriate URLs.
We sincerely hope that this post was helpful in guiding you through the process of learning how to alter the category base prefix in WordPress.