Remove Category Slug: How To Do This With WordPress

Steven2 responsesWordPress

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.

Learn how I made $33,543 online in the past 12 months.

Simply input your best email below to get started.

2 Comments

  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.

Learn how I made $33,543 online in the past 12 months.

Simply input your best email below to get started.

No thanks, I have enough money