Domain Mapping with IP shared among several WP/other scripts on my own server

Hi

I'm using (well testing/translating plugins now) WP Multisite, Buddypress, bbpress, Pro Sites, MultiDomain, Domain Mapping, ..., ALL with latest versions

I read it's highly recommanded to have a dedicated IP for WP Multisite with Domain Mapping for the following reasons :

- let WPMS handle the domain resolving to the correct sites

- let users to enter my IP in their domain registration panel

- in case the IP changes
- etc I read a lot of how-to those last days (Otto, Sarah, etc) :grinning:

==>>> for different reasons I cannot/do not want to have this working like that :

- first I have my own ("root") server coming with 1 IP, this IP won't change (unless I change server)

- I ordered a 2nd IP for another script (http://www.phpbbhs.com) which also need dedicated IP

- I cannot have more than 4 IP with my server there. this is in the feature list of the datacenter, and they said to me in email when I ordered a second IP and had to deeply insist : "Allocation of IP addresses is in accordance with RIPE guidelines. There is a shortage of IPv4 addresses, so we are under strict rules from RIPE for handing out additional IPs, and we need a valid technical reason for each IP. Please explain, what is a technical reason why you can't use your main IP? We need this information for RIPE"

- I also have other customers, with full hosting service including email, all managed by froxlor panel (instead of CPanel) and DNS by bind9, all working well with live sites (non WP)

- I want to be able to install several WPMS, one with buddypress for a community projet, at least one without buddypress, one multilanguage, etc.. some to serve my customers which have account with me (full ftp/email services, etc), I can't have one IP for each.

- I rather take control of the domain things and AName, and have my customers only enter my nameservers at their domain registrars, and on my server I send them either to one of the WP install, or to the phpBBHS install, or to their normal hosted account, I also want to be able to have a domain that goes to the WPMS BP site, and their email to be served by my standard account service
especially this will be a custom service, and I would like manual control, not automated

- I would like to avoid the customers to enter my IP and CName, and I prefer them to enter nameservers, even in the case the IP change (this could be the case if I order a new server), much easier to change on my side, rather than ask all the customer to update their CName, and also, lot of my customers are in Switzerland (my country) and nic.ch (aka Switch) for .ch domains only allow to enter nameservers, and I think we cannot manage our DNS there, so customers anyway cannot enter the server IP, only nameservers, and for most, would be to complex to have a http://xname.org/ or http://www.zoneedit.com/ account.
Ideally, I would also like to hide the domain mapping from the user dashboard, and handle all that via support email

====>> so basically, I would like this post to be the guideline to have Domain Mapping working with a shared IP, knowing that for me, the IP is shared only among my own customers, on my own server, if anyone has ideas/hints/questions/same concern/solutions : that will be great

fruthermore, I still have an installation issue with Domain Mapping (DB tables not created, thus domains not saved), it's there :
https://premium.wpmudev.org/forums/topic/domain-mapping-doesnt-save-1?replies=22#post-189704

thanks in advance for everything :slight_smile:

  • Arnold

    Doesn't work on a shared IP with domain mapping. Here's why.

    The whole purpose of DNS is to return an IP address that connects you with the right server, like a phone number. On shared servers you only have one IP address.

    Once you get to the server then what. Like a phone number you then have to tell the operator how to direct your call.

    The web server software, Apache, IIS whatever, looks at the domain name coming in and it can apply Virtual host rules to that name to decide where in the server you look for files. You will have a Primary domain which is usually the first one you signed up for. Let's call it "primary.com".This is mapped to look for files in your root public_html or htdocs or www directory depending on how your server is configured. So you can build a site there.

    You may also have addon domains. An addon domain returns exactly the same IP address but the webserver looks at the incoming URL and a table in virtual hosts that says this domain should look for it's files in the xyz directory (it usually has the same name as the incoming domain so let's call this second.com and it's in /second.com from your primary) So you can build a seperate site there.

    Now you add Multisite. In a subdomain install of multisite you add yet another redirection. The wildcard subdomain *.primary.com to your primary domain has the primary.com in it so that the web server knows where to send it. You could even add a *.second.com and have a second multisite in second.com because the url name contains "second.com" which tells it where to go. This works fine as long as you stick to subdomain or subdirectory installs of Multisite.

    In Multisite subdomain name "sub.primary.com" the sub. part tells Multisite to pull it's info, not from a subdirectory or subdomain but from a database for that Multisite. Same with a subdirectory install where the subdirectory text tells Multisite where to look in the database.

    When you add Domain Mapping there is yet another mapping saying "if you see an url with this domain name send it to this blog in this database". But you have to get the URL to the database in the first place, so you have to add the new domain to your DNS so it can be seen from outside.

    But ALL DNS returns is an IP address. The only one you have. The url comes in and the webserver looks at the "map.com" domain name and says "I don't know what this is" and it defaults to sending it to your primary.com and inside Wordpress the domain mapping takes over and send it to the right place.

    But it ALWAYS defaults to the primary.com. That's why it's primary, "when all else fails go to primary" The server can't know anything about directing to second.com just from an IP address. The url doesn't help because it doesn't have the text "second.com" in it or the text "primary.com" either. It only ends up at primary because all else failed. Having domain mapping on second.com is futile because there's nothing to get the server to send it there.

    CNAME mappings don't help in DNS because map.com pointing to second.com just tells the DNS to return the IP for second.com. It doesn't pass on "second.com" to anything so again the bare IP defaults to primary.com and second.com never gets a chance to map

    So on shared hosting you can make one Domain mapped Multisite on your primary domain. You can make as many subdomain/subdirectory Multisites as you like, sub1.second.com, sub2.second.com, because the "second.com" text is there to tell the server where to send them. But only one Domain mapped multisite on primary..com.

    Extra IPs solve this problem because now the IP itself can be pointed at a different subdirectory and therefore a different Multisite database where mapping can occur.

    So you're stuck with only one domain mapped multisite per IP and as many subdirectory/subdomain multisites as you like.

    Other scripts generally won't be bothered as they would be in the Add On domain category. So you could add phpBBS in it's own add on domain or in as many add on domains as you care to setup.

  • Patricia BT

    Thank you very much for your detailed answer,

    well, anyway, I cannot add much more IP on the server as I said, we are limited by RIPE guidelines about IP shortage,
    and I have read topics here and there that it would work without dedicated, just this is not recommended (which I understand if you are in a shared hosting environment, me I'm on my own server, with different sites all sharing the IP, but all managed by myself, with nameservers and all)

    well once the other problem is solved (plugin not installing correctly, see the other topic https://premium.wpmudev.org/forums/topic/domain-mapping-doesnt-save-1?replies=24#post-189827)

    I'm sure there are way to have it work I keep reading it's possible but not recommended... (and as I have read on some topics as this one for example : http://waitingforfairies.com/2010/wordpress-multi-site-domain-mapping-on-shared-hosting/ )
    as parked domain on the WP site, which is technically just an "account" on my own server, especially if I offer premium I also offer email... so I need virtual host to be taken by my panel and Bind, and not WP,

    about phpBBHS (hosted phpBB forums on 1 set of files), it needs and check for dedicated IP, as it's exactly the same as you explain me about mapped domains, not working on addon domain

    thank you in advance :slight_smile:

  • Patricia BT

    thank you for your answer

    my question was basically, how to make it work without a dedicated IP?,
    you say it won't work
    but well it works?!
    well, now I'm lost :O) could you explain "It's the multiple domain mapped multisites that are a problem"

    actually now that I solved the database table issue (see other topic), I can map a domain (even 2) to a users' blog, but I face a new issue : when under a mapped domain, I'm not recognized as logged in.

    if that is of importance, I have also the multidomain plugin, with the correct sunrise.php (the dm_sunrise, renamed), and have the "single sign-on" activated

    thank you in advance

  • Patricia BT

    Hi I'm back on this, and need some more answer :slight_smile:

    on this depends really how I'll organize my services

    after your answer I went on mode "OK guys, I need dedicated IP for my WP install, but then I need a network of network" in order to be able to have different WP project (some with buddypress, some not, etc)

    I asked a question at http://wpebooks.com (about if their Networks+ plugin will help me on that), and the answer I got was "Dedicated IP yes, but not dedicated in the sense that it can only be used with that install."

    errrr. so what?
    if I type my IP in the address bar, it must reach the WP install right? as you (Arnold, btw nice given name, my father's one :wink: told me then it's taken over by the DB to send that domain to that place (which I understand), but then how can I have multiple installs as they told me on wpebooks.com and how to make that all work with multi domain, domain mapping (and eventually network+) plugins?

    my ideal setup would be :
    - v.net : with multisite, but no buddypress, allow users to map their domain names either with WPMU Domain Mapping or even if I have to do it manually, and WPMU Pro Sites
    - s.ch : with multisite, and buddypress, also allow users to map their domain names with WPMU Domain Mapping and WPMU Pro Sites

    furthermore, we will also use WPMU MultiDomains (or does one of the Networks+ features replace that?), and we want to allow users to choose which domain their blog will be a subdomain of (for the users without their own mapped domain name), but we will not allow to be a direct subdomain of main s.ch (they can only register subdomains of synonym domains like l.ch or sub of sub with Networks+)

    we do not necessarily want to share plugins and themes. or at least activate only wherever we want, and on the s.ch buddypress/pro-site one, we want to have a set of plugins only for paying customers.

    we want all the users on the s.ch site to see the activity of s.ch blogs, but not from the v.net

    thx

  • Timothy Bowers

    Hey there.

    The only way to make this work without a dedicated IP is if by chance the shared IP falls on your install or you use Addon/Parked domains which is not ideal for your clients as it requires another manual step.

    I asked a question at http://wpebooks.com (about if their Networks+ plugin will help me on that), and the answer I got was "Dedicated IP yes, but not dedicated in the sense that it can only be used with that install."

    Same thing here, the IP can be shared however it must be dedicated in the sense that when you enter that IP in your browser it loads your multisite installation.

    if I type my IP in the address bar, it must reach the WP install right? as you (Arnold, btw nice given name, my father's one :wink: told me then it's taken over by the DB to send that domain to that place (which I understand), but then how can I have multiple installs as they told me on wpebooks.com and how to make that all work with multi domain, domain mapping (and eventually network+) plugins?

    You can run multiple networks with our Multi Domains plugin right here:

    https://premium.wpmudev.org/project/multi-domains

    This will let your have many different domains running networks. You can find more information on the link above about that.

    furthermore, we will also use WPMU MultiDomains (or does one of the Networks+ features replace that?), and we want to allow users to choose which domain their blog will be a subdomain of (for the users without their own mapped domain name), but we will not allow to be a direct subdomain of main s.ch (they can only register subdomains of synonym domains like l.ch or sub of sub with Networks+)

    I believe our Multi Domains and their Networks+ are pretty much the same thing, so they wouldn't be ran together.

    You can make different networks private or public, so maindomain.com could be private and no one can create sites there. Whereas secondNetworkDomain.com could be public, and then users can create sites there.

    we do not necessarily want to share plugins and themes. or at least activate only wherever we want, and on the s.ch buddypress/pro-site one, we want to have a set of plugins only for paying customers.
    we want all the users on the s.ch site to see the activity of s.ch blogs, but not from the v.net

    Users only need register once within your network and then should be able to access all aspects. Of course if they not given a link to something then chances of them finding it would be slim.

    Plugin and theme code would be shared, if this is what you mean?

    Take care.

  • Patricia BT

    thanks a lot Timothy for your fast answer

    actually I would like totally separated users on s.ch and v.net, and I want the v.net to be a community, with buddypress, your social theme, all feeds about what has been posted recently in the community, and all this without interacting at all with v.net users (which would only be "regular" customers)
    that's why I thought I would simply have 2 separate installs, but then if I want the domain mapping working for users on v.net and users on s.ch, I will need 2 dedicated IP right?

    so I thought their Network+ plugin will allow me to have a main install, and have different networks inside it, acting like different installs (and no their Network+ plugin has other features and they confirmed to me "No, Networks+ does not replace the MultiDomain plugin." here http://wpebooks.com/support/general/forum/topic/networks-pre-sale-question-multi-domains-domain-mapping-etc )
    I actually tried your multidomain plugin, which is nice, but will only allow to choose to which domain a user will have his subdomain at, right?

    btw, for my paying customers, as I will offer email account, I will create things manually, and ask them only to mention my nameservers at their registrar, I handle the DNS as well on my panel, so even on same IP, it's up to me to say that name is alias of that account.... so would that work?

  • Timothy Bowers

    Hey again.

    actually I would like totally separated users on s.ch and v.net, and I want the v.net to be a community, with buddypress, your social theme, all feeds about what has been posted recently in the community, and all this without interacting at all with v.net users (which would only be "regular" customers)
    that's why I thought I would simply have 2 separate installs, but then if I want the domain mapping working for users on v.net and users on s.ch, I will need 2 dedicated IP right?

    Yeah if you want both networks to have their own registrations and members, then two installs is the best way to go there.

    Two dedicated IPs would be needed to make it work without addon/parked domains i.e. pointing the A record.

    I actually tried your multidomain plugin, which is nice, but will only allow to choose to which domain a user will have his subdomain at, right?

    Thats correct it allows users to select which network they want their site in. Whereas the Network+ plugin looks to be more of a multiple network, where each network is independent which is what you are asking for right?

    If thats the case, then perhaps in this case their plugin would be the better match for that.

    btw, for my paying customers, as I will offer email account, I will create things manually, and ask them only to mention my nameservers at their registrar, I handle the DNS as well on my panel, so even on same IP, it's up to me to say that name is alias of that account.... so would that work?

    That would work if your clients will let you do that.

    I personally never would because I like full control of my own DNS, I like to control my own MX Records, CNAMEs and anything else I wish. I never like the idea of someone else controlling those for me. Forcing them to put their NS on you might be a deterrent from them using your service, especially if you want Business hosting with you as well. Unless of course you give them control to edit their DNS with you?

    Not everyone will feel the same, but it is for me.

    Take care.

  • Patricia BT

    thx again for fast answer

    I'll test out things...

    about my customers, the one on s.ch will be "free" but the ones on v.net barely know how to register a domain name, and they are anyway free to "leave" and point nameservers (at their registrar's account) to another host if they want to leave, but when they mention my nameservers, it's when I add the domain name in my panel that it creates all the DNS records in Bind9 on my server
    (I use froxlor, instead of cpanel, but well, same services)
    also at switch.ch (swiss domains registrar) I believe you can only mention nameservers, not DNS entries

    Two dedicated IPs would be needed to make it work without addon/parked domains i.e. pointing the A record.

    I never said I want to make it work without addon/parked domain, actually for v.net customers I want to make it work with addon domains (and at the same time create mail boxes, give them a few other features, like a webmail access, etc)
    so does that mean that I do not need dedi IP for that one?
    (the dedi IP would go to s.ch with all the features)

  • Timothy Bowers

    about my customers, the one on s.ch will be "free" but the ones on v.net barely know how to register a domain name, and they are anyway free to "leave" and point nameservers (at their registrar's account) to another host if they want to leave, but when they mention my nameservers, it's when I add the domain name in my panel that it creates all the DNS records in Bind9 on my server
    (I use froxlor, instead of cpanel, but well, same services)
    also at switch.ch (swiss domains registrar) I believe you can only mention nameservers, not DNS entries

    If they point their whole name servers to you though, then you will also be in charge of their MX records, if they need anything else handling they must go through you.

    I don't mean if they wanted to leave, just if they need to control other aspects of their DNS not pertaining to the services you offer.

    I never said I want to make it work without addon/parked domain, actually for v.net customers I want to make it work with addon domains (and at the same time create mail boxes, give them a few other features, like a webmail access, etc)
    so does that mean that I do not need dedi IP for that one?
    (the dedi IP would go to s.ch with all the features)

    You only need a dedicated IP if they are pointing their A records to you.

    If you have them forward their NS to you then have full control their over the virtual host on your server, so you can send them wherever you wish, you don't need a dedicated IP then.

    But if they are pointing their A Record only, then you need a dedicated IP.

    Take care.

  • Arnold

    If I understand you correctly. Sounds like a minimum of 2 IPs

    One for v.net with
    Multisite
    Domain Mapping

    One for s.ch With
    Multisite
    Domain Mapping,
    MultiDomain to get subdomains of the mapped domains.

    Now I'm not sure about the granularity of MultiDomain and Prosites. I don't kknow if it can differentiate between public and private sites yet.

    The rule basically is one IP for each Domain Mapping site.

  • Patricia BT

    @Arnold, so you say "Sounds like a minimum of 2 IPs"

    Timothy says "If you have them forward their NS to you then have full control their over the virtual host on your server, so you can send them wherever you wish, you don't need a dedicated IP then." (for one of the install)

    and Ron from http://wpebooks.com said "Dedicated IP yes, but not dedicated in the sense that it can only be used with that install.""

    see why I'm lost :slight_smile:

    actually it's following your (Arnold) first answers above that I thought about needing dedi IP so I wanted to find a solution to have only 1 install, and do all from there

    really RIPE IP allocation is on strict rules, and anyway, if I have 10 WPMS projects with domain mapping, I cannot have 10 IP....

    if anyone has an idea ... :slight_smile:

    thx to all

  • Arnold

    Don't confuse standard Virtual Named sites on Shared Hosting were you have the Web server receiving EVERYTHING on one IP and then using the Domain name to send the request to a specific subdirectory.
    And what Multisite does which is AFTER it arrives at a specfic (server's finished with it) directory uses the name to pick a database blog. Two very different things.

    And the reason they say what they did above? "Dedicated IP yes, but not dedicated in the sense that it can only be used with that install. "

    Yes you could have 50 Multisite installs as subdomain or subdirectory but only one as Domain Mapping. Domain Mapping is your buggaboo on shared Hosting.

    I understand about RIPE but I'm sure you could find a Host that was more available on IPs. Shoot I've got 6 on my home cable line included.

  • Patricia BT

    well, that datacenter (hetzner.de) is so good (hardware, support in 5 minutes, network, tools like robot, live images for rescue, for system install... etc and for fair price) I want to keep servers there. And anywhere else in Europe will have to follow same rules (and you? where are you? here in Switzerland I must pay high-price for even 1 on phone line)

    ok, Arnold, thx a lot for all your answers and time... I'll test things out with all your answers
    (for info, I might post in a few weeks how I will set up things and site lauch)

    thx again to you 2.

  • Daniel

    Hi there, I trust Patricia you managed to get everything resolved and working as you wanted. I would be grateful however if you are able to provide a little clarity in my saturation.

    I am running a wpmu in a shared hosting environment. If I have been following right, could you please tell me how I can to about mapping a child blog to a customers domain. Like Patricia, I am quite happy to limit my clients to change their name servers or buy the domain off myself in the first place as I do not have the opportunity to get a dedicated IP for my multisite.

    Which records etc. need to be changed? What do they need changed to etc.? How do I actually go about mapping a domain / parked domain / add-on domain?

    I'm grateful for your help.

    Kind regards,
    Daniel

  • Timothy Bowers

    Hey there.

    With a dedicated IP you can use A Records so that they maintain control of the domain but point it to your IP.

    With no dedicated IP you wouldn't be able to use the eNom feature, that maps it to your IP because the DNS is control remotely by them.

    If you have to use Parked Domains then you can add those in your cPanel but then it means you control their MX Records and everything about their domain. One or Two sites is fine, but if you had a bunch of them that all then want email, new sites on sub domains, etc, then you're going to have a lot of work to do and a full cPanel with tons of stuff going on.

    Of course they could set the MX Records to something like Google.

    It comes down to security, if they want their own email without using Google or similar, having a ton of clients use your one cPanel as an email server could not only slow things down but if it gets hacked then all your clients do.

    I suppose you could give them all their own cPanel account on the same server and manually change the VH file for the main domain so that the DocumentRoot is for your multisite. Would be a lot of messing around and I suspect you not having a dedicated IP would mean you don't have access for this unless your IP is elsewhere on your server.

    Personally I'd go the A Record way and let them handle their own email and sub domains.

    I've not heard from Patricia for a little while so she might busy and not be along to respond.

    If you need any further assistance then please do feel free to open a new thread so that we may assist you further.