I'd like to find a way to make subdomain addresses work for some of my important tags and categories. For instance foo.thesite.com would show content for thesite.com/category/foo.

I've been trying to make this working using my .htaccess file and the DNS but I can't get it to work properly.

Making the subdomain forward to the right URL is just a matter of the right DNS settings, but then I also want to make sure the site shows it as foo.thesite.com.

Can anyone provide some ideas on how to make this work?

Update - April 6: I found one partial solution. If you have full domain DNS control and you have the CURL DNS option you can add a subdomain and point it to the category or tag page. The catch is that when I did this, clicking links leaves the URL as foo.thesite.com, and the title somehow doesn't work--instead of a title I get the URL as the page title.

Any thoughts on this, alternatives, or ideas on how to format the .htaccess rules?

2 Answers 2


This plugin will help you:


Also, wp_redirect could be helpful:


  • Thanks. I'm trying to avoid adding more plugins to my site, and I'd like to make it work for tags too, but the second link you provided is interesting. I'll see if I can make the .htaccess rule work for my circumstance.
    – Andrew
    Commented Apr 6, 2011 at 13:45
  • As it turns out I couldn't make that work. The .htaccess rules don't work for me either. The redirect is a good idea, but without a work .htaccess rule it doesn't accomplish the goal.
    – Andrew
    Commented Apr 6, 2011 at 15:02

this plugin does it: https://wordpress.org/plugins/main-category-as-subdomain you can also choose custom themes for each category

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.