Having DNS resolution issues with Domain Mapping

I just set up multiple installations of multisite on one server (which has 1 static IP) and each installation is located in its own folder off of the Root folder. There is also a website installed to the Root folder.

These installations are not subdomains of one install. They are each separate installs placed within their respective "Root Folder" off of the actual Root Folder. (hopefully that makes sense)

Server Folders Example (1 static IP serves all domains):
(/) "site1" - domain mapping installed
(/site2/public_html) "site2" - domain mapping installed
(/site3/public_html) "site3" - domain mapping installed
(/site4/public_html) "site4" - domain mapping installed

Example of my issue:
A) Site2 has a mapped domain. When I attempt to visit the mapped domain for some reason it resolves to the right server IP but sends me to the ProSites upgrade page of Site3.

B) I can reach a subdomain url just fine (blog1.Site2.com) but I can't reach the primary domain (Site2.com) - It's weird...

Each domain has sunrise.php where it needs to go, each has define('SUNRISE', 'on'); within wp-config and all subdomain installs are "true"

Hope there is enough here to get some help started. I'm using SiteGorund for the host. Thanks!

  • Kasia Swiderska

    Hello Josh,

    How did you configured your mapped domains? Are they add-on domain that are pointing to right root directory? When I say root directory I mean /site2/public_html for site 2. Or did you add A record with your IP? They should not be A record as on your IP there is more than one site.
    I'm also using SiteGround and I'm using add-on domains to map them with Domain Mapping.

    kind regards,
    Kasia

  • Josh-VisionIntoDestiny.com

    Hey Kasia,

    This is how I set mine up...

    Pointing the External Domains:
    The domain names are not hosted with siteground, so I created an A record for each domain name with the registrar that points to the IP of the (siteground) host server.

    Siteground Addon and Subdomain Settings:
    The primary domain of each multi-site install are then all added as addon domains and point to each site's respective "document root".

    Then, each primary domain additionally gets added to a subdomain using a wildcard (*.site2.com) and each points to each site's respective "document root".

    A user would have to create an A record if they wanted to map their blog/site to their domain on one of my networks. They would have to assign an A record pointing to my server IP and between my wildcard subdomain and the domain mapping plugin, the site should resolve as the mapped domain.

    Is this how yours are set up?

    Thanks!!

  • Kasia Swiderska

    Hello Josh,

    Pointing the External Domains:
    The domain names are not hosted with siteground, so I created an A record for each domain name with the registrar that points to the IP of the (siteground) host server.

    I did that differently. In my domain provided panel I changed DNS to siteground DNS and then in the SiteGround added those domains as add-ons with own directories.

    A user would have to create an A record if they wanted to map their blog/site to their domain on one of my networks. They would have to assign an A record pointing to my server IP and between my wildcard subdomain and the domain mapping plugin, the site should resolve as the mapped domain.

    That would work (A record with IP) - if they would have blog on your main network site1 - network that shows when you type IP in browser.
    Then Domain Mapping will work its magic.

    If your site2, site3, site3 are not accessible from IP then A record wont work. For those domains, that you want to be mapped on "sub" networks, nameservers of siteground have to be added and those domains also need to be added as add-ons domain in Siteground panel and pointed to right root directory. So before that external domain will be mapped, when you type it in browser it will show right main site of the network. After domain will be mapped Domain Mapping handle that.

    Hope that helps.

    kind regards,
    Kasia

  • Josh-VisionIntoDestiny.com

    Here is how my file structure looks along with DNS settings:
    Note: /root hosts MULTISITE1.com

    Folder Structure:
    /root
    (root)/MULTISITESITE2.com/public
    (root)/MULTISITESITE3.com/public

    DNS Settings:
    Root: MULTISITE1.com
    Addon domain pointing MULTISITE1.com to /
    Subdomain *.MULTISITESITE1.com points to /

    Root: MULTISITE2.com
    Addon domain pointing MULTISITE2.com to /MULTISITE2.com/public
    Subdomain *.MULTISITESITE2.com points to /MULTISITE2.com/public

    Root: MULTISITE3.com
    Addon domain pointing MULTISITE3.com to /MULTISITE3.com/public
    Subdomain *.MULTISITESITE3.com points to /MULTISITE3.com/public

    STATIC SERVER IP SERVING ALL SITES: 192.168.1.1 (sample IP)

    Mapping External Domains:
    Example: blog1.MULTISITE1.com mapped using the Domain Mapping plugin to niceblog.com.
    so niceblog.com would need an A record pointing to server Ip 192.168.1.1

    Example: blog1.MULTISITE2.com mapped using the Domain Mapping plugin to superblog.com.
    so superblog.com would need an A record pointing to server Ip 192.168.1.1

    Example: blog1.MULTISITE3.com mapped using the Domain Mapping plugin to wonderblog.com.
    so wonderblog.com would need an A record pointing to server Ip 192.168.1.1

    If I am following you correctly, does this look like how you have set yours up?

    Obviously for an automated MultiSite to work, a client can't set their domain to use my siteground nameserver and I can't go and manually add each client as an addon domain, that would defeat the purpose. So we have to rely on the A record pointing to the server IP to work and allow the Addon Domain and wildcard subdomain of each network site to direct you to the right place.

    Did I follow you correctly on this Kasia? Is there any error in my setup here that you see?

    Thanks =)

  • Rupok

    Hi Josh,

    Wow! You really have a big complex network. Kudos!

    Let me describe the scenario. Please let us know if we are not on the same page.

    # You have your main multisite network at "main.com" (suppose)
    # "main.com" network has a subsite called "sub.main.com"
    # "main.com" location is " / "

    # You have second network at "second.com"
    # "second.com" network has a subsite called "sub2.second.com"
    # "second.com" location is " /second/html "
    # "second.com" domain was added as "Addon Domain" in your hosting and pointed to " /second/html "
    # "*.second.com" wildcard entry was created and pointed to " /second/html "

    # You have third network at "third.com"
    # "third.com" network has a subsite called "sub3.third.com"
    # "third.com" location is " /third/html "
    # "third.com" domain was added as "Addon Domain" in your hosting and pointed to " /third/html "
    # "*.third.com" wildcard entry was created and pointed to " /third/html "

    I hope we are good until this. Now please help me understand the next part.

    Suppose I want to map "map2.com" to "sub2.second.com" and mapped that through Domain Mapping. And I added an "A" record in "map2.com" DNS panel pointing to "192.168.1.1".

    So when I enter "map2.com" in my browser, the request will be gone to "192.168.1.1". When the server gets a request for "map2.com", where shall it forward the request? There are two possibilities:

    # When you hit "192.168.1.1" in your browser, it opens up "main.com". In this case, your server shall forward the request of "map2.com" to "main.com" but "main.com" doesn't know what to serve against this request.

    # If you hit "192.168.1.1" in your browser, it doesn't open "main.com", then your server will serve a 404 page or some error.

    If you enter "sub2.second.com", your server will take the request to "second.com" because a wildcard entry is there in your server. But when a request for "map2.com" comes to server, your server doesn't know where to forward that. If your server forwarded that request to "second.com", then "second.com" would serve "sub2.second.com" data because "second.com" knows that "map2.com" is mapped to "sub2.second.com".

    Are we clear till this?

    Well, now how can we solve this? We can solve this by adding "map2.com" in your server as "Addon Domain" and pointing that to "second.com" aka "/second/html". When this is done, your server will know that if any request comes for "map2.com", it has to forward that request to "second.com" and "second.com" knows what subsite to serve.

    I believe, this is the most optimum setup and the only way to resolve your issue.

    Please let us know if you have any confusion. We will be glad to help further.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.