Search for a plugin or theme

How to Remove the Category from WordPress URL (3 Methods)

You are currently viewing How to Remove the Category from WordPress URL (3 Methods)

WordPress will automatically include the category name in the post’s URL by default.

Including the category name in the URL will help your users and search engines better understand and index your website.

The URL structure indicates what the post and the category are about to the readers.

Moreover, because every WordPress category has its archive page, the category name in the URL simplifies the navigation into that specific archive page.

However, some will say, and for a good reason, that a cleaner URL is more user-friendly and will benefit the overall SEO of your website.

Therefore, this article will teach you how to remove the category from the URL in every possible way.

Why Remove Category from URL

There are many good reasons why to remove the category name from the URL, and here are only some of them:

  • Clean URL – stripped URL will look better and more visually appealing.
  • SEO-friendly – helping Google to understand the article’s subject based on the keyword in the link.
  • Uncategorized – by default, WordPress posts will have no category until you assign one to them. Posts without a category will have the Uncategorized text in the URL. We should eliminate that.
  • Easier to remember – short links are easier to remember and will be shared more often.

Now that you know in which cases you should remove the category base from the URL, let’s move on and learn how to do it.

You can remove the category name from WordPress URL in three different methods:

  • Permalinks settings
  • Using a plugin
  • SEO plugins

All the methods that I’ll show you are simple and easy to follow and will initially do the same thing.

Please remember to create a 301 redirect rule for your blog posts after changing the link structure of your website.

It doesn’t require installing any plugin or using any codes because we will do it from the native WordPress dashboard.

This is the easiest way to remove the category from the link and, therefore, my preferred method.

  1. Navigate to setting -> permalink and choose the custom structure option.

  2. Add the category variable to the left of the URL slug and fill the category base field with a dot.Remove category from WordPress permalinks

  3. Save the changes and visit one of your blog posts to verify the new link structure.

Remove Category from WordPress URL Using a Plugin

No configuration is required when using the Remove Category URL plugin, making it another excellent option.

From your WordPress dashboard, navigate to plugins -> add new and search for Remove Category URL.

Remove Category URL WordPress Plugin

Activating the plugin is the only thing you’ll need to do to make it work.

Once activated, the plugin will remove ‘/category‘ from your category permalinks. (e.g. `/category/my-category/` to `/my-category/`).

Please note: deactivating the plugin will revert this process and the URL structure to what it used to be before the changes.

Removing Category from URL with an SEO Plugin

Here is another excellent method to remove the category from the URL structure because most of us already use an SEO plugin.

In this part, we will strip the category base from the URL with Yoast or RankMath plugins.

Yoast

If you have Yoast activated on your WordPress website, you’re in luck.

Navigate to SEO -> search Appearance and enter into the taxonomies tab.

Yoast Taxonomies tab

There, scroll to the bottom of the page and enable the ‘remove the categories prefix‘ option.

Remove category URL with Yoast plugin

Enabling this feature will remove that /category/ prefix for categories only.

RankMath

RankMath is another popular SEO plugin that quickly strips the category from the URL.

Once activated the plugin on your WordPress website, navigate to the Rank Math -> general settings screen.

There, toggle the Strip Category Base option to save the changes.

Remove-the-category-from-URL-with-the-RankMath-plugin

Just like we did earlier, enter one of your categories archive pages and verify that the category was removed from the URL successfully.

Conclusion

In this article, you learned how to remove the category from WordPress URL in every possible way.

Removing the category base from the URL is an excellent way to optimize your taxonomies pages. To take it a step further, learn how to display the category description in WordPress.

Leave us a comment and tell us which method you used to achieve this task.

Also, make sure to subscribe to our YouTube channel and like our page on Facebook.

PluginsForWP

PluginsForWP is a website specializing in redistributing WordPress plugins and themes with a variety of knowledge about WordPress, internet marketing, and blogging.

Leave a Reply


Get notified about new content and coupon codes!

JOIN OUR COMMUNITY OF 120,000+ WORDPRESS ENTHUSIASTS