WordPress gives us an awesome way to control the structure of the base URL’s of our blog with the name called Permalinks. It allows us to specify custom permalink structure for our urls, so we can have an easy to remember and user friendly URL’s across our site.
However, the default install of WordPress will add the word “category” to your url structure before the actual category name. Having /category/ in the url of your blog url isn’t very useful, you could end up with a very unattractive permalink and it will make the URL longer and harder to remember. Keep in mind that URL’s are an important part of SEO.
From an SEO standpoint, the deeper keywords are in the URL the less relevant they are. Therefore, we should always try to make our category URLs more SEO friendly by adding the targeted keywords. Having the best SEO friendly permalink structure is a positive vote to the major search engines, specially Google.
By default, WordPress shows category archives like so:
http:/yourblog.com/category/catname/
Let’s see how to get rid of this useless words in the URL. Following are two ways to achieve this:
1. Manual .htaccess code method
First backup your .htaccess file, then add the following code to .htaccess file.
RewriteRule ^category/(.+)$ http://www.yourblog.com/$1 [R=301,L]
This will remove “/category/” from category URLs in your WordPress blog. Howeve, it only works with top level category URLs. It does not work with sub-categories and will show 404 error for them.
2. Use “WP No Category Base” plugin
Using WP No Category Base plugin is the most easy way to remove “/category/” from URL. URLs of all categories will be modified automatically and will not contain “/category/”. I have not tested it myself, but heard it works like it’s intended to.