Subdomains allows users to setup there main categories as subdomains. It’s a lite and fast code.

== Description ==

Subdomains allows users to setup there main categories as subdomains. It’s a lite and fast code.
It’s setup all main categories as subdomains.

Please leave a commment at http://pankajanupam.in/wordpress-plugins/subdomains/ for any issue & help me to improve the plugin.
I will reply within 4 hours.

Note: Please set permalinks to /%category%/%postname%/

== Installation ==

You can install Subdomains directly from the WordPress admin panel.
Visit the Plugins > Add New page and search for ‘Subdomains’.
Click to install. Once installed, activate and it is functional.

Manual Installation Subdomains plugin:

Download and unzip the file

Upload the full extracted folder to the /wp-content/plugins/ directory

Activate the plugin through the ‘Plugins’ menu in WordPress.

You’re done! The Plugin ready to use according to the directions in the description.

== Frequently Asked Questions ==

= Where can I see this in action =

My blog is based on this plugin: http://pankajanupam.com

== Screenshots ==

None

== Changelog ==

= 0.1 =
Beta Release

 

 

 

 

Download Link: http://wordpress.org/extend/plugins/subdomains/

Please mail me at mymail.anupamATgmail.com for any assistance.

108 Comments

  1. Conrad says:

    It is functional, but you should really add the option to be able to choose which categories we want as sub domains, instead of all categories being sub domains.
    Please add this and I’ll give 5 stars! :)

  2. Vikty says:

    Hello!

    Great for the plugins, is wonderful and works really well. Thank you very much for your work.

    I found 3 small minor problems.

    1) The links to the subdomains are shown with 2 bars at the end / / http://categoy.domain.com/ /

    2) When a category is included as a subcategory within another is shown as: subcategory.domain.com/category and fails, the link should appear like this and work very well: subcategory.domain.com

    3) If you enter domain.com / category / “CategoryName” should redirect to “CategoryName”. domain.com to avoid duplicate content in search engines.

    A greeting and thanks.

  3. User says:

    After install I got error 404 at all posts. After uninstall – same situation!
    What this plugin change in my files? My site out of order.

  4. User says:

    Great support! My site have some issues with plugin, Mr. PANKAJ ANUPAM repaired it in minutes, now all works fine. Highly reccomend!

  5. pamulaisme says:

    this plugin not work for me.

  6. carlos says:

    I followed the instructions step by step but is not working

  7. I think I might have done something wrong, mine goes

    blog.www.sitename.com?

    The main site will remain as the site, but I want the blog pages to have a .blog subdomain. Can you let me know what I did wrong?

  8. Vikty says:

    Hello!

    Congratulations on the excellent work

    As I can make my permalinks instead of http://site1.mysite.com/postaname/ as http://site1.mysite.com/postaname.HTML

    What do I have to change so that possible?

    thanks

  9. DodoG says:

    When I activate plugin I get error 500 or 403 on subdomains? What is wrong?

    Wp. 3.2.1, plugin 0.5

  10. Mike says:

    Hi Pankaj

    I am interested in hiring you to make a few custom modifications to this plugin for my needs. Please email me using the address I left this comment with.

    Thanks

    Mike

  11. prasanth says:

    Plugin is really well coded for main categories…wen it comes for sub domain i am facing issue

    example:
    hindi.cineonlinegallery.com (this is working well)
    hindi.cineonlinegallery.com/hindi-actors (this i am getting 404 error)

    please suggest me wat to do

  12. Jaime Avila says:

    Dear Pankaj:

    Firstly thanks for sharing your work and your time. I always make a donation for the software I use. I think it’s important that you can keep updating and improving.

    I’ve installed your utility. Permalinks was configured as /% category% /% postname% /. “Subdomains” has been renamed the categories perfectly (“http://www.de-bebe.com/category/cuidados/” a “cuidados.de-bebe.com”). But my problem is that the browser can not find the new pages.

    I’ve cleared the cache several times, I have removed W3 Total Cache. After this still does not find the categories. I created a new category. After I have tried to create view from the back office, and the browser can not find the new category.

    You know what could it be?

    Thank you very much for your interest and for your time and sorry for my bad English.

    Regards,

    Jaime Avila

  13. Jaime Avila says:

    Dear Pankaj:

    Firstly thanks for sharing your work and your time. I always make a donation for the software I use. I think it’s important that you can keep updating and improving.

    I’ve installed your utility. Permalinks was configured as /% category% /% postname% /. “Subdomains” has been renamed the categories perfectly (“http://www.de-bebe.com/category/cuidados/” to “cuidados.de-bebe.com”). But my problem is that the browser can not find the new pages.

    I’ve cleared the cache several times, I have removed W3 Total Cache. After this still does not find the categories.

    I created a new category. After this, when I try to see it from the the back office, the browser can not find this new category.

    You know what could it be?

    Thank you very much for your interest and for your time; and sorry for my bad English.

    Regards,

    Jaime Avila

  14. chickenhs says:

    Hello, I suggest you refer to this plugin http://wordpress.org/extend/plugins/wordpress-subdomains/

    It allows us to use different theme on different categories and I want it.

    Also, do your plugin support wordpress installed under subdomain?

  15. David says:

    Hello Pankaj.

    I have the same problem than prasanth, with the last version (0.5 ).

    Great work!

  16. Jaime says:

    Hi

    Do you know an installation manual explaining “wildcard domain setup”?

    Thanks and sorry for the inconvenience.

    Regards,

    Jaime

  17. User says:

    Hi,

    How I can migrate from WP Subdomains? Is it possible?

    May be in the nearest future you can develop the same or integrate existing code to work with WP 3.3.

    http://wordpress.org/extend/plugins/wordpress-subdomains/

  18. Krasen says:

    Really good job in here! I was looking for such a plugin for a while.
    I know that the plugin purpose is to change the category to subdomain, but do you have in mind for the next releases to make it useable with taxonomies?
    For instance I have custom post type – music and taxonomy – genres, like dance, rock, metal. Will it be possible in the near future to choose between our taxonomies, not only by categories?

  19. Jason says:

    I use a redirect script for URL’s ending in mywebsite.com/%postname%/ is there any way to change it so that posts link to subdomain.mywebsite.com/SOMETHING/%postname% ?

    When the plugin is active by default posts link to subdomain.mywebsite.com/%postname%/ which redirects to another URL instead of going to the post page.

  20. User says:

    Hi,

    How I can migrate from WP Subdomains (not maintained WordPress plugin)? Is it possible?

    May be in the nearest future you can develop the same or integrate existing code to work with WP 3.3.

  21. Jaime says:

    Does anyone know where there is a tutorial that explains how I have to configure “wildcard domain setup”?

    Thank you very much and forgive my lack of knowledge.

    A greeting.

    Jaime

  22. Jaime says:

    Hi Pankaj:

    I’ve already installed your plugin, finally it was very simple. If you want I can upload a manual for beginners like me, in English and Spanish language.

    I’ve uninstalled it, but everything else worked perfectly, pages with previous post did not work. If you ever solved this I am very interested in your plugin and recommend it as a great plugin.

    A greeting and thank you very much for everything.

    Jaime

  23. Mirza Faiq says:

    I m facing a problem here, plugin works fine as per as your guide the issue is when i go to single post my login session expires and i m unable view single post as a login member, so i m unable to reply as well. Also not able to login from the single post login session.

    I disable the plugin and it went all fine. Can you help me in that because this is a useful plugin for any site but this minor issue is making it useless.

    St0L3n

  24. gulflee says:

    any others step to do? after activate it get empty although the page url is changed

  25. Krasen says:

    Still no answer about my last question. Anyway – I’ve found something new. The plugin doesn’t work with cyrillic categories and post slugs. It must be matching problem with the rewrite rules, but I am not good in regular expressions and can’t make it work.
    It will be too hard to fix this? Even with category slug in english – when my post slug is in cyrrilic I get 404 error.

  26. Dan says:

    I can’t get the plugin to work. I set up the subdomain and change th permalinks to custom structure of /%category%/%postname%/ , but can’t get the post to display properly.

    When I try to view the page the url in the browser is as expected ( example hunting.mysite.com/scopes/), but instead of seeing the post I get:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@hunting.mysite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

    Do I need to do something special with the document root for the subdomain or do I need to do something with the redirection? Or maybe it is something else?

    Please advise.

    Thanks.

  27. Mert says:

    Heyy, great plugin, thanks man.
    Sadly I found one bug. In the category page when I’m clicking to Older Post link, it is removing the subdomain. For example.

    living.mydomain.com
    living.mydomain.com/page/2 (should be but instead of this, it is going to:)
    mydomain.com/page/2

  28. John says:

    Hey man,
    Awesome plugin! I have to ask, when you’re planing to releasing next version? I’m waiting for it..

  29. MG says:

    Hi Pankaj,

    I’m getting unknown host when i click on subdomain links. i have added permalink as specified in installation file.

    Do i need to setup permalink before installation

  30. dubya says:

    Hi. Awesome plugin! Is it possible to make it work with custom post type categories?

    • Yes, Find $texonomy_slug in code and replace current value with custom category slug

      • the_guv says:

        There is no “$texonomy_slug”, nor “$taxonomy_slug” … there is $slug but damned if I can find a value.

        Pakaj, please clarify how to use this with custom post types.

        Thank you … I’m poised to donate :)

        • Pankaj Anupam says:

          Sorry My Mistake,

          In Line no 33, You will find “$this->field =’category_name’;”

          Replace “category_name” with taxonomy slug. You can find taxonomy slug in admin taxonomy page url.

  31. Jake says:

    Hey Pankaj, great plugin and thanks for your work.

    How can we setup a wildcard domain? We already tried putting the * subdomain A record on our domain’s DNS setup but it hasn’t helped make your plugin work at all.

    Any suggestions? Also, are you planning to make a control panel for this on the WordPress backend? We’d love to donate if so. Thanks!

  32. chumbi says:

    Hi! I am terribly sorry to not be able to use this pluging! It’s exactly what I need and it doesn’t work for me I think I configured everything at the server, as the subdomain exists, but the plugin does not make the redirection to the main category as it should – ot shows error at the server Where can I be wrong?! Thanks for any hints

  33. chumbi says:

    Thanks a lot, Pankaj!

  34. Viicti says:

    Hello;

    I found a IMPORTANT BUG in the plugin.

    When a category have more than one page (eg http://ifsc-code.pankajanupam.com/) the link to go from page (“Older Entries) not working properly, instead of:

    http://ifsc-code.pankajanupam.com/page/2

    leads to:

    http://pankajanupam.com/page/2/

    This always happens, how can we solve this problem?

    A greeting. Thank you very much. A great job Pankaj Anupam!

  35. Chris Roberts says:

    Hi, Pankaj! The plugin works great, but I have a suggestion.

    I’ve noticed that for permalinks on single entries the plugin seems to call up whatever is immediately before the /%postname%/ to make the subdomain. So the subdomain will correctly show the category slug when it is /%category%/%postname%/ — so category.domain.com. In the same way, if I have the word archive in the permalink string — /%category%/archive/%postname%/ — the subdomain will now be archive.domain.com. Based on this, two questions.

    Have you tried any other method to call up the category on permalinks. Perhaps having it call from the first part of the string? Second, is there any way to have subcategories reflected accordingly? So instead of the subcategory being given it’s own subdomain, have it show as category.domain.com/subcategory.

    Also, have you thought about extending this plugin to pages?

    Again, thank you for the great work with this plugin!

  36. Worki says:

    Please give an option to disable the category subdomain for the default category.

  37. the_guv says:

    No worries Pankaj … I’m sorted now, albeit with the WP Subdomains plugin.

    Tx tho, I know it’s hard to support this kind of stuff. And would say your plugin is excellent.

  38. seo says:

    hi
    thanks for your plugin.i add it but when i changed the permalink to /%category%/%postname%/ after it when click to post go to 404 page! why?

    • Please setup a wildcard domain. Required

      After a successful DNS entry you can access you website home page with any subdomain. After that active the plugin it will work.

      • seo says:

        no.i set wldcard and subdomain is ok.bat when i change permalink to /%category%/%postname%/ it dose not work!permalink have a problem

  39. Molly says:

    How do you access the category specific feeds now or is it not possible?

    Each category feed redirects to the main site feed even when I replace the subdirectory with the category name…http://codex.wordpress.org/WordPress_Feeds

  40. victii says:

    Hello;

    I found a IMPORTANT BUG in the plugin.

    When a category have more than one page (eg http://ifsc-code.pankajanupam.com/) the link to go from page (“Older Entries) not working properly, instead of:

    http://ifsc-code.pankajanupam.com/page/2

    leads to:

    http://pankajanupam.com/page/2/

    This always happens, how can we solve this problem?

    A greeting. Thank you very much. A great job Pankaj Anupam

    how can we solve this problem?

  41. Gary says:

    I have two sub domains setup with my host and now I’m waiting for the DNS to setup or something like that. They told me its going to take anywhere from 1hour-48hours for the DNS. I wrote a few post, they appear on my homepage and when I click them there is no page for them. I guess this is due to the fact of the DNS setup? What is a wildcard domain? What is a successful DNS entry?

  42. Gary says:

    I actually got everything to work. Thank You So Much!

  43. Oil Benefits says:

    I have tried installing this, but can’t get it to work.

    I have configured wildcard for DNS settings, I have installed the plugin, named the categories for slugs, but it won’t work.

    Any clues?

    Thanks

    • Oil Benefits says:

      Any ideas? Still not working. I tried everything… setting up DNS wildcard in name servers, wildcard in hosting, reinstalling plugin, deleting and replacing .htaccess file, reinstalling plugin… The links and categories change accordingly, but when you click on a category it spends a long time trying to find where to go to, and then it just says failed to open page…

      Please help.

  44. Ivan Jaquez says:

    Hello PANKAJ ANUPAM. My site is working great with the suggested permalink structure /%category%/%postname%/, but I need to use this one: /%category%/%postname%.html . Could it be possible? What do I need to set up to make it work? Thanks for your consideration :-)

  45. Ivan Jaquez says:

    By the way I’m using a hostgator shared account and cloudflare.com. Thanks.

  46. Guard says:

    Hi ,
    what do i need to do with the subdomains after i created them in cpanel ?
    if i need to redirect, what do i redirect to ?

    Script installed successfully and now categories point to sub.domain.com but the page could not be found.

    Thanks

    • Pankaj Anupam says:

      Add wildcard DNS
      *.pankajanupam.com 14400 IN A (server IP here)

      OR

      Add a wildcard sub domain and point it to public_html or your site root folder
      EX:
      pankajanupam.com -> /var/www/html
      *.pankajanupam.com => /var/www/html

      IF
      you are able to access you site with any sub domain.
      You setup it correctly.
      ELSE
      wildcard sub domain not setup correctly. Please check setting

  47. Manu says:

    Hi !

    your plugin works great on my blog : http://biz.wf .

    I have just one big problem, the pagination doesn t work for an active category, “older entries” link on the index and a http://category.domain.com/page/2 don t work, have you any solution ?

    +

  48. Marc says:

    Strange. My last two comments seem to have been deleted. I setup the plugin on my site but it’s still not working. I instaleld it, uninstalled it, and still not working. I setup wildcard on DNS so they all forward to the main domain, but that still doesn’t work.

    I asked my hostgator customer support team and they said that i have to change the htaccess file… any idea how to do this?

    please take a look at my site if you can. thanks!

  49. Ashish says:

    5* to this great plugin!

    I have two suggestions, please see if these suggestions can be covered in next release of this plugin:

    1. Flexibility to make any type of permalink OR atleast add “.html”
    2. Option to disable sub-domain for sub-categories.

    Thank you. Have a nice day.

  50. Hi! I’m trying to use this on a wp 3.4 site and I have a couple of questions.

    1 – Is it possible to use “selected” categories. I have some categories I rather not have as subdomains. I can’t find any admin-interface for doing this, but I see that you have commented about it. “I will add in next release.”
    2 – Do you have any idea if WordPress has changed something in the .htaccess on newer releases, I cant get the subdomain to work when the plugin is enabled. but without, it redirects me to my main page (So I presume that the wildcars is working)

  51. Ivan Jaquez says:

    Hello Pankaj. Could these 3 suggestions be covered in next release of this plugin?

    1-) Flexibility to make any type of permalink OR atleast add “.html” and the
    2-) The main page of Category treated by WordPress as an Index rather than an archive.
    3-) If someone comes to the site on an old category or page url it redirects them to the new Subdomain one.

    Thanks a lot!

  52. uvebana says:

    Work for WP 3.4?

  53. Jason says:

    Hey Pankaj, thanks for the plugin! I’d like to add in another voice for support of a custom permalink structure that’s not /%category%/%postname%/

    Any suggestions for editing your plugin directly to do that?

  54. Damian says:

    How can i make this plugin work with nginx?

  55. Roland says:

    Hi!

    I have a problem: If I login to the main page, at the sub-domains must log in again.

    Brgds,
    Roland

    • Pankaj Anupam says:

      Hi Roland,

      WordPress create cookies for root level which is not valid for subdomains. You have to overwrite WordPress login process to active it.

  56. Al.Ch says:

    Hello,

    Thank you for this great mod …

    I installed the mod and it re-writes the urls .. but when I click in the posts or categories it gives me a not-found page.

    please note that I have set a wildcard redirect for all subdomains to the public_html

    I mean *.domain.com => public_html

    but as I mentioned its not working … do I have to add anything is htaccess or something like that ?

    thank you

  57. Al.Ch says:

    Thanks to Pankaj Anupam for his fast and complete email support , my problem is solved.

    it was related to my hosting account,

    Here is instructions to add a wildcard subdomain in cpanel :

    1- Goto : cPanel > Subdomains

    2- Crease a new subdomain as below :
    Subdomain : *
    Document Root : public_html

    then press the create button and you R done.

    I hope it helps …
    =========================
    Now some of you maybe ask youself that why Pankaj Anupam created this mod ?

    This mod is a great thing to optimize your wordpress website’s SEO , because having the main keywords in your domain name is so important to google bots and you will have your main keywords (categories) in your domain by using this great mod … :)

  58. Abraham says:

    Hello, thank you very much for your plugin. It works perfect!

    Just one thing, how do I make the subcategories look like:

    category.domain.com/subcategory

    Thank you!

  59. CTO.VN says:

    Thanks for your post… i like this plugin ..

    so thanks

  60. Al.Ch says:

    Hi,

    Any plans to solve the pagination issue ?

    it has become a really big deal in my website .. it would be great if you solve it please …

    thank you

Leave a Comment

Please keep in mind that comments are moderated and rel="nofollow" is in use. So, please do not use a spammy keyword or a domain as your name, or it will be deleted. Let us have a personal and meaningful conversation instead.


× 4 = twenty