Dukeo » WordPress » Remove Category Slug: How To Do This With WordPress

Remove Category Slug: How To Do This With WordPress

Steven 2 responses WordPress

If you are like me, you may be wondering why WordPress forces you to display /category/ in your category archives url structure. This adds one depth level in your website structure that is not even used to display content.

The default WordPress structure displays category archives like this: http://dukeo.com/category/wordpress/. With a very simple Apache .htaccess trick, your link structure will be like this: http://dukeo.com/wordpress/.

To do this, you should open the .htaccess file from the root of your WordPress installation. For example, for Dukeo, .htaccess is located in /public_html/.

In your .htaccess file, add the following line:

RewriteRule ^category/(.+)$ http://www.dukeo.com/$1 [R=301,L]

Don’t forget to replace www.dukeo.com with your own domain name.

If you enjoyed this article,
Get email updates

Join for Free »


  1. Blogging & Wordpress

    Will that method redirect our old category URLs to new one with 301 permanent. please give me the reply.
    Presently I am doing it with a plugin.

    Thanks in Advanced!

    1. Keep in mind that it’s important to have as few plugins as possible on your blog to avoid performance issues.