[resolved] Domain for one site from network (19 posts)

  1. xzoom
    Posted 4 years ago #

    I have a multsite WP with subdirectories, and I wonder if is possible to redirect a domain to one site.

    I mean, I have for example http://www.blogmultisite.com/site1 and I want point http://www.domainX.com to this site1. Other sites will remain as http://www.blogmultisite.com/siteX.

    Do you know if it is possible?

    Marta Gaspar

  2. Yes. The WPMU Domain Mapping plugin can do that for you. :)

  3. xzoom
    Posted 4 years ago #

    Thanks, and can it be actived only for one site?

  4. Yep!

  5. No, it's activated network wide or it will not work.

  6. Sorry, I meant 'Yes, you can only network map one site' (not 'you have to activate it network wide'). English is my first language, I swear!

    Basically you can use it to map as many or as few domains as you want. But do activate it for your network :)

  7. the plugin will not affect the other sites either.

  8. tulacat
    Posted 4 years ago #

    I think this is exactly what I need too so I'm "contributing" :-) with a couple of questions whose answers may confirm my direction. I already have multisite working (in testing/research mode) and was disappointed to see that I only had the Sub-domains or Sub-directories option but not Separate-domain.

    1. Is that "WPMU Domain Mapping" plugin this one:


    2. Will it give me one code base, one database (with multiple "wp_#_" table prefixes), and allow me to have multiple sites like this:
    http://www.bbqcats.net/ ...etc...

    ... all with their completely separate content (file/media) folders and permalinks so that some random user on one site won't see references to the other sites?

    3. Just one more question (still in context). When I turned on Multisite it told me to create a folder called "blogs.dir". Is that a special name or could I have named it "sites" like Drupal does?

    Thank you very much all you smart and beautiful wordpress gurus.

  9. 1. Yes.

    2. Yes. (the files will be in /wp-content/blogs.dir/1/files/etc... but will LOOK like they're in /files/etc... )

    3. It's a special name. Name the folder blogs.dir

  10. Also, blogs.dir only contains *media* files. the blogs themselves are virtual and live only in the db.

    These blogs are all domain mapped in one install:


  11. tulacat
    Posted 4 years ago #

    Excellent! Thanks both of you.
    I'll give it a shot tonight (or this weekend).

  12. xzoom
    Posted 4 years ago #

    Thanks a lot for your help! I will try it ...

  13. tulacat
    Posted 4 years ago #

    Hi xzoom, I hope you don't mind me piggybacking on this thread. I think we really are trying to do the same thing, and when I get it working I'll definitely try to explain what I had to do.

    In the meantime, this was very confusing last night. I got the plugin installed but am not clear on what I need to do in cpanel with the domain config on bluehost and where WP-MS picks it up.

    I guess my big question (to the gurus) now is this:

    4. Is it REALLY necessary to have WP installed in the "home" directory (right under "public_html") of my hosting account? I already have a Drupal multi-site installation running (with its own index.php right there) so I was hoping I could have a public_html/wordpress_super_admin/ installation on the same bluehost account with all the child wp sites under that sub directory . The fact that my admin wordpress installation is in a subdirectory may be the reason I'm having trouble making sense of the domain settings in bluehost. It works fine that way using the subdomain or subdirectory options, but maybe not the separatedomains that I want.

    I'm committed to WordPress for future development and plan on eventually porting the drupal sites over after I get WP-MS up and running to my satisfaction, but if I have to take down the Drupal sites first, I will.

    Thanks again, Ron

  14. It's harder to direct the mapped domains within your webhost when they are not on the primary account. instead of parking them, you need to use the add-on domain feature and change the folder name to be the same as the wp install.

  15. tulacat
    Posted 4 years ago #

    That was not hard at all. Just takes some knowledge of the terminology and visualization of what's going on.

    I got a test set of 2 sites working with a wp install (adminsite.com) in a subfolder below the root of my webhost account, and it is not the main bluehost account. Those two other as yet unused sites were simply mapped with bluehost cpanel as add-ons pointing to the same subfolder as the adminsite installation (thanks Andrea). That is all it takes on bluehost. I reset the DNS zone files for all three relevant domains, which means you do not need to make any changes in the DNS Zone editor to make this work on bluehost. I'm pretty sure other quality shared hosting services like godaddy and hostgator are similar.

    Then in WP-MS I used the cname option (not the ipaddress) in the Domain Mapping Configuration form. That cname is simply the wp-ms installation adminsite.com. I'm not sure how to tweak the domain options yet, but at this point the only one checked is "Permanent redirect".

    I had to add each sub "site" in WP-MS using a Site Address without the .com.

    Then I added the 2 domains (using the .com suffix) under the Domain Mapping: Domains form and magically the 2 sites appeared when entered subsite2.com and subsite3.com in a browser address field. They show up without the adminsite.com in front of them.

    This is obviously a brain dump (sp please excuse the typos and grammar flaws). I can provide more explicit details later if asked. This was only a test. I'm now going to play with it a bit to discover some features and map out how I want things organized for real.

    My purpose in doing this is a bit different than the public multi-blog concept under which I think WP-MU was envisioned. I simply want all MY sites to work under one codebase and one database with a centralized admin function.

    Congrats WordPress, this is a major step forward.

  16. tulacat
    Posted 4 years ago #

    A couple more details to add:

    I want to emphasize that my superadmin site is NOT in the root directory of my bluehost account. I'm sure it can be (and maybe should for simplicity) but apparently is not necessary. Mine is in a folder, one level below <home>/public_html/. On bluehost I used add-on domains, but I told it the site files live in an existing directory (the same one as the admin site).

    In the domain mapping configuration page, I simply entered my "superadmin.com" in the Server CNAME domain field, and left the IP address field blank (even though I have a static IP through bluehost).

    And in the domain mapping plugin, (on the Domain Mapping: Domains page) the Site ID is the ID you would see in your status bar when you hover over the site "Path" on the All Sites page. That should be made more obvious somehow.

    Also on the domain mapping: domains page, I checked all my sub sites as "Primary" to make their URL show up on their address bar as subsite.com and not as adminsite.com/subsite

    And one more thing: Someone I read on this subject hinted that you may have problems with your permalinks if you try to install multisite in a subdirectory under public_html, but so far I have not seen a problem and all my posts and pages seem to work fine. However, I am still in the exploratory/setup stage (nowhere near live) so I'm sure I'll find a few snags.

  17. RonStrilaeff
    Posted 3 years ago #

    Another update:

    It IS also possible to install WordPress Multisite using subdomains even when the multisite installation is in a folder under your public_html directory. (The previous discussion was about using the sub-directory multi-site install option which also works).

    On the bluehost side you must create your rootsite.com as an add-on domain mapped to whatever install folder you like eg: public_html/rootsite

    Then create a subdomain named * on that rootsite and assign it to that same folder. Bluehost will want to create a folder call "wildcard", but you must change that to "rootsite" before saving. This looks weirdly recursive when you see it in your bluehost config so it took me a few minutes to visualize what was happening.

    It is a good idea to do that host side setup first so the WPMS install does not choke when it gets to the point of re-logging in after that step where you modify your wp-config and .htaccess files.

    Then go ahead and install the WPMS with sub-domain option following these directions (but ignoring the part about "You cannot choose Sub-domain Install in the following cases: WordPress install is in a directory (not in document root).")

    I also discovered the
    define( 'NOBLOGREDIRECT', 'http://rootsites.com/' );
    to put in the wp-config to prevent strange behavior if someone types in an non-existent subdomain.

    Then lastly, to create a new subdomain/blog in WPMS just add a new site. You don't have to do anything more on bluehost since the * (wildcard) subdomain maps <everything>.rootsite.com to the rootsite installation folder.

    So, by the end of the day (tomorrow), I plan on having this under one bluehost account:
    3 multisite installations, each with its own database (and database super user).
    - 1 of them will be using the sub-domain option
    - 2 will be using the sub-folder option and use the "WordPress MU Domain Mapping" plugin to make all the sites look totally separate.

    This is pretty close to magic in my opinion and I'm so thankful for the real WP developers that made all this possible.

    Ron (formerly tulacat... who is now dead :-) )

  18. harringg
    Posted 3 years ago #

    I'm moving all my sites to BH and have multiple domains setup as Add-On sites.

    I'm stuck at this point of the instructions for WordPress MU Domain Mapping Plugin.

    My WP is installed at the root of public_html


    With two Addon domains at the root of public_html/


    With BH, do I have access to WHM?

    I do have the Network setup properly and have the following in place:

    myprimarydomain-wordpress-install.com\addon_Site1 (which I want pointing to myaddondomain-wordpress-install.com)

    = For Cpanel users =

    If your domain uses the nameservers on your hosting account you should follow these instructions. If the nameservers are elsewhere change the A record or CNAME as documented above.
    Add a wildcard subdomain/virtual host record to your site's DNS record in Web Host Manager (WHM). If you do not have access to WHM, you must email your web host and ask them to make this one change for you. Should be no problem:

    * Go to "Edit DNS Zone" and select the domain of your WPMU installation and click "Edit".
    * Below "Add New Entries Below This Line", enter in the first box (Domain) an asterisk: "*".
    * The second box, TTL, should be "14400".
    * The third box should be "IN".
    * Select A Record Type from the drop down "A".
    * And in the last box, paste in the IP address of your website/network.

    From Cpanel, click on the "Parked Domains" under the "Domains" section:

    * Under "Create a New Parked Domain" enter the domain name you want to add to your network.
    * Click the "Add Domain" button.
    * It should add the domain to the list of parked domains and under "Redirect to" it will say "not redirected". That is OKAY.

    Now you're ready to do your domain mapping.

  19. RonStrilaeff
    Posted 3 years ago #

    I think all of that functionality you described is under:
    cPanel -> Domains -> DNS Zone Editor.

    However... Those directions may be overkill on Bluehost (who must have made it easier since that was written). I say that because I just now chose a working (but still under development) subdomain that is part of a WPMU installation and, and pressed the link/button under "DNS Zone Editor" that said "Reset Zone File" (back to a default state) .. and that site still works as before. So I'd leave that DNS stuff alone for now and just set up a normal add-on domain in Bluehost pointing to the same folder as the main site and then work with the WP side of things to get them to recognize each other. That domain mapping plugin is necessary to make the add-on domain look like it's own independent URL if that you are wanting to do.


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.