18 pointsStarting to get into this DEV thingI'm new here
chrisegg
Member
—
18th January 2012
Server: Bluehost (shared)
IP: Dedicated
WordPress install: Multisite, but not on the root directory
Plugin: Installed correctly (according to instructions)
My site works great, except for when I try to map a domain to it. Instead of directing the domain to, the site I want, it directs it to the site on the root directory (which by the way is not WP).
Does my install need to be on the root in order for domain mapping to work?
Server: Bluehost (shared)
IP: Dedicated
WordPress install: Multisite, but not on the root directory
Plugin: Installed correctly (according to instructions)
My site works great, except for when I try to map a domain to it. Instead of directing the domain to, the site I want, it directs it to the site on the root directory (which by the way is not WP).
Does my install need to be on the root in order for domain mapping to work?
I've never tried anything else other than root personally to be honest, but I would say yes.
This is because the domain being mapped has its A record pointing to the Multisites IP. If its not in the root folder then WordPress won't catch that domain and thus will not map it. WordPress and this plugin wouldn't even know that the domain is pointing to the IP because the install is in a sub folder.
Yes, and no! The site that is currently on the main root, is not WordPress so I can not add it to the network...But I guess I'll have to make up some changes...If that is my only option...
Ok, FYI for anyone else who has the same problem/question and finds this post!
To make it work:
Step one: setup Dedicated IP
Step two: from bluehost cpanel, go to "Addon Domains" -> select and add your domain and direct it to the subdirectory where your wordpress multisite installation is.
Step three: install and configure Domain Mapping plugin
Step four: add domain to the site you want it mapped too.
Yup, providing the domain can land on the WordPress install then in theory it could work.
If the domain continued to land at the directory above where there is no WordPress install then WP would not know about the domain.
Your way of making the domain an Addon does not require a dedicated IP, as cPanel handles that aspect.
The issue will come when you do this with a third party DNS unless they point their NS to you and then you add their site to your cPanel Addon domains. More manual work there though.
Hey I was trying to do this here...(except with WildCard subdomains Multisite)
I can use my hosting (Godaddy) (ugh!) to add subdomains and point them to the directory, however when trying to add a wildcard subdomain setup to a directory other than root, the addon/subdomain method (and yours mentioned above) doesn't work for wildcards, as I would have to manually add them per site.
(if you found a way to get the wildcards to work please let me know)
I would say some .htaccess trickery would be the only way to handle this...
I did find the following information for directing the main domain (in this case)
to a subdirectory. If anyone knows how to modify it for multiple domains with wildcard ability I will give you a million dollars!
Here is the .htaccess code template:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?main\-domain.com$ [NC]
RewriteCond %{REQUEST_URI} !^/sub\-folder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /sub-folder/$1
RewriteCond %{HTTP_HOST} ^(www.)?main\-domain.com$ [NC]
RewriteRule ^(/)?$ sub-folder/index.php [L]
Thanks so much for the addon domain info, chrisegg. I've been toiling with this for several days and was able to get it working perfectly with your explanation.
Responses (6)
Support Chimp — 18th January 2012 #
Hey chrisegg.
I've never tried anything else other than root personally to be honest, but I would say yes.
This is because the domain being mapped has its A record pointing to the Multisites IP. If its not in the root folder then WordPress won't catch that domain and thus will not map it. WordPress and this plugin wouldn't even know that the domain is pointing to the IP because the install is in a sub folder.
Can you move it up to the root?
Take care.
Member — 18th January 2012 #
Yes, and no! The site that is currently on the main root, is not WordPress so I can not add it to the network...But I guess I'll have to make up some changes...If that is my only option...
Thanks
Member — 19th January 2012 #
Ok, FYI for anyone else who has the same problem/question and finds this post!
To make it work:
Step one: setup Dedicated IP
Step two: from bluehost cpanel, go to "Addon Domains" -> select and add your domain and direct it to the subdirectory where your wordpress multisite installation is.
Step three: install and configure Domain Mapping plugin
Step four: add domain to the site you want it mapped too.
That is it...
Support Chimp — 30th January 2012 #
Yup, providing the domain can land on the WordPress install then in theory it could work.
If the domain continued to land at the directory above where there is no WordPress install then WP would not know about the domain.
Your way of making the domain an Addon does not require a dedicated IP, as cPanel handles that aspect.
The issue will come when you do this with a third party DNS unless they point their NS to you and then you add their site to your cPanel Addon domains. More manual work there though.
Anyway, glad you got it working for you. :-)
Take care.
Member — 5th April 2012 #
Hey I was trying to do this here...(except with WildCard subdomains Multisite)
I can use my hosting (Godaddy) (ugh!) to add subdomains and point them to the directory, however when trying to add a wildcard subdomain setup to a directory other than root, the addon/subdomain method (and yours mentioned above) doesn't work for wildcards, as I would have to manually add them per site.
(if you found a way to get the wildcards to work please let me know)
I would say some .htaccess trickery would be the only way to handle this...
I did find the following information for directing the main domain (in this case)
to a subdirectory. If anyone knows how to modify it for multiple domains with wildcard ability I will give you a million dollars!
Here is the .htaccess code template:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?main\-domain.com$ [NC]
RewriteCond %{REQUEST_URI} !^/sub\-folder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /sub-folder/$1
RewriteCond %{HTTP_HOST} ^(www.)?main\-domain.com$ [NC]
RewriteRule ^(/)?$ sub-folder/index.php [L]
http://chanon-srithongsook.info/development-notes/change-main-domain-to-subfolder/
(just kidding about the million dollars!)
Member — 5th April 2012 #
Thanks so much for the addon domain info, chrisegg. I've been toiling with this for several days and was able to get it working perfectly with your explanation.
Become a member