MY NUMBER 1 RECOMMENDATION TO CREATE FULL TIME INCOME ONLINE: CLICK HERE
Do you want to change the base category prefix in WordPress?
By default, WordPress automatically prefixes /category/ to URLs for all category pages. However, you can easily change the base category prefix or remove it completely.
In this article, we will show you how to change the default category prefix in WordPress.
What is a base category prefix? Should we change it?
Everyone category it gets its own page on your WordPress site and RSS feed. You can see all the posts saved in a category by visiting that category’s archive page.
By default, WordPress adds “category” as the base prefix to URLs for category pages. This helps to differentiate pages and posts from category and tag archives.
For example, if you have a category called “News”, its URL will look like this:
http://example.com/category/news/
Similarly, WordPress adds tag prefixes to URLs for tag archives.
http://example.com/tag/iphone/
this SEO friendly URL structure helps users and search engines understand what kind of page they are visiting.
Most sites don’t need to change the base prefix at all. However, if you’re creating a niche site where you’d like to use a different word or phrase for your categories, you can change the base category prefix to reflect that.
Changing the default category prefix in WordPress
Changing the default category prefix is pretty simple in WordPress.
You must visit Settings » Permanent connections page in your WordPress dashboard and scroll down to the “Optional” section.
In the ‘Category base’ field, you can enter the prefix you want to use in addition to the category base option. You can also change the base tag prefix if you want.
For example, you can add ‘themes’ as a new prefix. In this case, your category URLs will look like this:
http://example.com/topics/news/
Don’t forget to click the “Save Changes” button to save your settings.
Removing the base category prefix from URLs
Many of our users have asked us about completely removing the base category prefix from WordPress URLs. This will change your category URLs to look like this:
http://example.com/news/
This is not a good idea and we recommend that you do not remove the base category prefix.
The base category prefix helps users and search engines distinguish between posts/pages and categories. If you remove the prefix, your URLs become ambiguous, which is not good for the user experience or WordPress SEO.
You may also encounter technical issues with various WordPress plugins. For example, if you have a category and a page with the same name, or if you use %postname% as the URL structure for individual posts, your site will go through an endless redirect loop, causing the pages to never load.
But if you still want to do it, you can use All in one SEO (AIOSEO) to include.
It is the best SEO plugin for WordPress and optimizes your website for search engines very easily. Additionally, it allows you to remove the basic category prefix with the click of a button.
For this tutorial we will use AIOSEO Pro license because it includes category base removal feature and other powerful options like redirect manager and link helper. There is also a AIOSEO free version that you can use.
First, you will need to install and activate the AIOSEO plugin. For more details, see our guide at how to install a WordPress plugin.
After activation, you will see the AIOSEO setup wizard. Simply click the ‘Let’s get started’ button. You can view our guide at how to set up all in one SEO for WordPress for more information.
Then you can go to All in one search engine SEO » Appearance in your WordPress admin panel and click on the ‘Taxonomy’ tab.
After that, go to the “Categories” section and switch to the “Advanced” tab. From here, simply click the toggle button to Yes for the “Remove Basic Category Prefix” option.
Don’t forget to click the “Save Changes” button when you’re done.
Setting up redirects after changing the base category prefix
If you are changing or removing a base category prefix to a new one WordPress website, then you don’t need to do anything. However, if you do this on an existing site, users who visit the old category page will see a 404 error.
To fix this, you will need to set up a redirect to ensure that search engines and regular visitors are properly redirected to the correct category page on your site.
The easiest way to set up a redirect in WordPress is to use All in one SEO (AIOSEO) to include.
To get started, you can go to All in One SEO » Redirects in your WordPress admin panel and then click the “Activate Redirects” button.
Once it’s active, you can go to the “Redirects” tab and set up a redirect.
Simply enter the URL you want to redirect in the “Source URL” field and the new link location under the “Destination URL” field.
As for the redirect type, you can select “301 Permanently Moved” from the dropdown menu. This will permanently move your old category pages to the new destination.
Don’t forget to click the “Add Redirect” button when you’re done.
See our for more details a beginner’s guide to creating 301 redirects in WordPress.
Now all your users and search engines will be redirected to the correct URLs using your new category prefix.
We hope this article helped you learn how to change the default category prefix in WordPress. You may also want to check out our list the most wanted WordPress tips, tricks and hacks and how to start an online store.
If you liked this article, please subscribe to ours YouTube channel for WordPress video tutorials. You can also find us at Twitter and Facebook.
.
MY NUMBER 1 RECOMMENDATION TO CREATE FULL TIME INCOME ONLINE: CLICK HERE