Remove the Category Base from WordPress URL

Published:

|

Updated:

WordPress automatically adds a /category/ base (also known as a prefix) to your website URLs for blog category (or archive) pages.

Generally, it's advised to remove it for cleaner, shorter, and SEO-friendly URL structures.

However, removing it may cause unintended side effects and negative SEO impacts than benefits.

In this beginner's guide, I've shared the benefits of keeping the category base while explaining the steps to remove or change it should you decide.

As a precaution, I've also shown the unrecommended method to remove it, often suggested by many websites and people, and why you should NOT follow that.

Let's get started.

Remove the Category Base from WordPress URL

Why You Should NOT Remove the Category Base

First, let's see why you should not remove the category from the WordPress URL.

Reason 1 - URL Duplication

If your website contains pages, blogs, and other custom post types, removing the base may cause URL duplication.

For instance, if you have a category called web-development, then any new page you publish with the same name will have a 2 in the URL, like the following.

example.com/web-development/ (Archive page)
example.com/web-development-2/ (Static page)

Reason 2 - Confusing URL or Link

Using the above example of example.com/web-development/, if a user sees a link to your site in SERPs (Search Engine Results Page), there's no way for them to know whether they'll end up on an archive or static page.

Because generally, web-development hints at anything related to web development but not an archive page.

Because of that, a user might disappointingly leave the site. And as a result, this may negatively impact your SEO.

With the prefix in place, your URLs would be like the following.

example.com/category/web-development/ (Archive page)
example.com/web-development/ (Static page)

Which explicitly lets the users and search engines know what kind of this content or page is about at a glance.

Reason 3 - Content Mix-up and Incorrect Sitemap Structure

Website SEO and sitemap planning are important, so you must ensure that your website pages are organized appropriately and neatly.

This helps identify the type of page to search engines and visitors.

If you remove it, you'll be mixing up your different kinds of content pages in terms of URL and sitemap structure.

Take a look at the following examples.

example.com/web-development/ (Archive page)
example.com/resources/ (Downloadable resources)
example.com/litespeed-cache/ (Product review)
example.com/guide-to-cpanel/ (Blog post)

Notice how all those pages are next to the root domain without any subdirectory. And there's no way to know which page refers to which type of content.

That's a bad organization of the URL and sitemap structure.

Instead, with a planned permalink structure, you could have the following.

example.com/category/web-development/ (Archive page)
example.com/resources/ (Downloadable resources)
example.com/reviews/litespeed-cache/ (Product review)
example.com/blog/guide-to-cpanel/ (Blog post)

Getting Started - Remove Category Prefix from WordPress Permalinks or URLs

Now, let's see how to remove the category base from URLs in WordPress.

But first, let's discuss the unrecommended method I mentioned above and why you should avoid that.

DO NOT Use This Method to Remove Category from URL in WordPress

You may have noticed that many people and websites suggest the following method to remove it; by adding a dot in the category base.

They tell you to add the following Custom Structure tags in your Permalinks options on the site dashboard.

/%category%/%postname%/

And they also tell you to add a dot "." to the Category base field like the following.

Unrecommended method to remove category base from WordPress URL.
Unrecommended method to remove category base from WordPress URL.
View Original Image Size

STOP! DO NOT use this method. This is an SEO-destructive method.

While this method removes the category base from the URLs, those people and websites don't mention the side effects of using it.

This method causes the archive name prefix to be included in the URL for the blogs and other custom post types like the following.

The unrecommended method adds the category name prefix to WordPress posts' URLs.
The unrecommended method adds the category name prefix to WordPress posts' URLs.
View Original Image Size

Unless that's what you intend to happen to your website, you should not follow this method.

Consequently, if you've dozens of blog posts published on your production website, this method will result in all those blog posts showing a "404 Page Not Found" error.

Worst case scenario, you'll have to add redirects to ALL of your existing blog posts.

Recommended Way to Remove Category from WordPress URL Using a Plugin

If you want to remove the category base from your URLs, follow the below steps.

I've mentioned the recommended and easiest way to remove the category from the URL using a WordPress plugin.

WordPress plugins like Rank Math SEO and Yoast SEO offer the option to help you easily remove the category slug from WordPress URLs.

Apart from helping you remove it, these plugins help enhance your SEO and offer other useful features.

Note

Before you proceed with the steps below, you should keep in mind that the screenshots and the steps may differ slightly from your website setup because of differences in version, updates, and other customizations.

In any case, I always try my bests to keep the screenshots, tutorial steps, and other related resources updated as possible.

Option 1 - Rank Math SEO Plugin

Step 1 - Downloading and Installing the Rank Math SEO Plugin

Log in to your WordPress admin dashboard.

From your WordPress dashboard > Plugins > Add New page, download and install Rank Math.

Once installed, activate it.

Step 2 - Configuring the Rank Math SEO Plugin

Upon activation, go to Rank Math > General Settings option.

Next, open the Links tab, and look for the Strip Category Base option.

Click on the toggle to turn it on.

Once done, click on the Save Changes button at the bottom.

Removing category base from WordPress URL with Rank Math SEO plugin.
Removing category base from WordPress URL with Rank Math SEO plugin.
View Original Image Size

Step 3 - Confirming the Removal of Category Base Slug

After activating the option, check with one of your categories to ensure the plugin removed category from WordPress URL.

Successfully removed category base from WordPress URL.
Successfully removed category base from WordPress URL.
View Original Image Size

Option 2 - Yoast SEO Plugin

Step 1 - Downloading and Installing the Yoast SEO Plugin

From the admin dashboard, download and install Yoast SEO.

Once installed, activate it.

Step 2 - Configuring the Yoast SEO Plugin

After activation, go to Yoast SEO > Search Appearance > Taxonomies tab.

Scroll down until you find the Category URLs option.

Click on the button to toggle it to Remove.

Once done, click on the Save changes button at the bottom.

Removing category base from WordPress URL with Yoast SEO plugin.
Removing category base from WordPress URL with Yoast SEO plugin.
View Original Image Size

Step 3 - Confirmation of Removal of Category Slug

Visit one of your blog archive pages to ensure it removed category from WordPress URLs.

Successfully removed category base from WordPress URL.
Successfully removed category base from WordPress URL.
View Original Image Size

Option 3 - SEOPress Plugin

Step 1 - Downloading and Installing the SEOPress Plugin

Log in to your website.

From the admin dashboard > Plugins > Add New page, download and install SEOPress.

Once installed, activate it.

Step 2 - Configuring the SEOPress Plugin

Once activated, go to SEO > Advanced option.

Next, open the Advanced tab, and look for the Remove /category/ in URL option.

Click on the checkbox to turn the option on.

Once done, click on the Save changes button.

Removing category base from WordPress URL with SEOPress plugin.
Removing category base from WordPress URL with SEOPress plugin.
View Original Image Size

Step 3 - Confirming if Category Base Is Removed

Upon the option activation, visit any of your categories and ensure it removed category prefix in the URL.

Successfully removed category base from WordPress URL.
Successfully removed category base from WordPress URL.
View Original Image Size

Option 4 - All in One SEO Plugin

Just a heads up, the free version of this plugin doesn't allow you to remove the category prefix. This functionality is only available to the plugin's paid (Pro) users.

Step 1 - Downloading and Installing the All in One SEO Plugin

Download and install All in One SEO from the site dashboard.

Once installed, activate it.

Step 2 - Configuring the All in One SEO Plugin

Upon activation, navigate to the All in One SEO > Search Appearance option.

Then, on the Taxonomies tab > Categories section > Advanced pane, look for the Remove Category Base Prefix option.

Turn the option on by clicking on the Yes button.

Once done, click on the Save Changes button.

Removing category base from WordPress URL with All in One SEO plugin.
Removing category base from WordPress URL with All in One SEO plugin.
View Original Image Size

Step 3 - Confirmation of Category Prefix Removal

Once the option is activated, visit any of your category archive URLs and ensure the category prefix is removed.

Successfully removed category base from WordPress URL.
Successfully removed category base from WordPress URL.
View Original Image Size

Option 5 - Remove Category URL Plugin

While this plugin hasn't been updated in a long time (as of writing this article), it still works fine, even in 2022.

It's a straightforward plugin that helps you remove the category base slug without requiring any configuration.

Step 1 - Downloading and Installing the Remove Category URL Plugin

Log in to your WP dashboard.

From the dashboard > Plugins > Add New page, download and install Remove Category URL.

Once downloaded and installed, activate it.

After activation, it should automatically remove the category slug without any additional configuration required on your end.

Step 2 - Confirming the Removal of Category Base Slug Removal

Visit any blog archive to confirm whether you got rid of category from your WordPress permalinks.

Successfully removed category base from WordPress URL.
Successfully removed category base from WordPress URL.
View Original Image Size

Changing the Category Base or Category Text

Now, we'll see how to change it without configuring the site PHP files like functions.php, htaccess file, etc.

Fortunately, WordPress allows you to modify the permalinks of your website without a plugin. With that, you can change the category base prefix.

It's a good thing if you don't want to use a plugin for doing that.

Let's go ahead and change the category base settings in the Permalinks options.

Note

As it may sound obvious, changing or renaming your category base name won't show up on the frontend of your site if you remove the category base prefix.

Step 1 - Logging in to the WordPress Dashboard

Log in to your site dashboard and navigate to Settings > Permalinks option.

Step 2 - Configuring the Category Base Text

In the Permalinks option, scroll down until you find the Optional section.

From this section, you can change the Category base.

We'll use the word topics as our new URL prefix for the categories.

Changing the Category base or category text to topics from WordPress Permalinks options.
Changing the Category base or category text to topics from WordPress Permalinks options.
View Original Image Size

Step 3 - Confirming if Category Base Text Changed

Visit the frontend of your category page and note how the category prefix is now changed to topics.

Changing the Category base to topics from WordPress Permalinks options.
Changing the Category base to topics from WordPress Permalinks options.
View Original Image Size

Conclusion

I hope this comprehensive tutorial helped you easily change or remove the category base prefix from your WordPress website.

Feel free to via the email [email protected] if you face any issues or have questions.

Frequently Asked Questions About Removing the Category Base from WordPress URL

How Do I Remove a Category from a URL Base?

Install the Remove Category URL plugin to remove the category from the URL base. It'll automatically remove the category base without any configuration.

Alternatively, see the Recommended Way to Remove Category Base from WordPress URL Using a Plugin section of the tutorial above for more info.

How Do I Change the Category Base Prefix in WordPress?

To change the category base prefix in WordPress, follow the steps in the Changing the Category Base or Category Text section of the tutorial above.

Should I Remove the Category Base Prefix from WordPress Permalinks?

Speaking generally, no, you should not.

If you decide to remove it, you may face unintended URL and SEO issues.

See the Why You Should NOT Remove the Category Base section of the tutorial above to see why keeping it might benefit your website.

Additional Resources

Below, I've dropped a few links to some of the things mentioned in this tutorial. Consider checking them out if you want to read more about them.

Contents

    Danial Zahid's headshot.

    About Danial Zahid

    I'm a self-taught web developer passionate about everything related to websites and web development. Over the past years, I've explored and worked with different web technologies and tools, notably WordPress, Eleventy, npm, and Gulp.js, to name a few.

    In addition, I've created and currently maintain several open-source projects, including web apps, widgets, websites, and more.

    When I'm not writing content for W3Things or doing web development work, I enjoy my free time by playing games or listening to podcasts.

    Get Essential Gulp Kit

    The ultimate Gulp.js solution to improve your developer experience.

    • Includes complete Gulp.js toolkit setup
    • Optimize website content and static assets
    • Continuous asset optimization during development phase
    • Optimize unlimited number of files in bulk
    • Plus many more awesome features

    Subscribe to the Newsletter

    This website uses cookies to optimize your site experience. By continuing to use the site, you are agreeing to its privacy policy and the use of cookies.