Is it possible to setup a domain mapping network if the main network itself is on a subdomain ?

I understand that the main site of a network using the Domain Mapping Plugin can not use a www prefix ( http://www.domain.com) url and should be run as just domain.com, however I have a multisite network which i'm trying to setup where the main site of the network itself needs to be a sub domain ..

Here's my setup;
* the network will reside at network.mydomain.com (because mydomain.com is already in use)
* I'm using a subfolder rather than subdomain option for the network setup.
* sunrise file is in the correct place and is tagged in the wp-config file.

Here's my problem ;-(
* I've setup a new site on the network which I get to ok by going to subdomain.mydomain.com/newdomainsite
* I want to point http://www.newdomain.com to this network site
* I've added the A record for newdomain.com to point to the IP address of the network
* I've setup a CNAME of http://www.newdomain.com to point to newdomain.com via dns
* If I browse to either http://www.newdomain.com or newdomain.com I just get sent to the homepage of my networks main site ... which is subdomain.mydomain.com/

The site is on a dedicated server (on amazon ec2) and has a dedicated ip address. The new domain arrives at the network but doesn't get mapped to the sites subfolder ?

Any help would be appreciated thanks

  • timvb
    • Design Lord, Child of Thor

    Hi @aristath here's the contents of my .htaccess

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress
  • aristath
    • Recruit

    Hey @timvb, sorry it took me a while to get back to you on this issue, I missed your last reply.

    I can't see anything wrong with your .htaccess file...

    Could you please post a screenshot of the domain mapping settings of the subdomain.mydomain.com/newdomainsite site?

    You also mentioned this:

    I've setup a CNAME of http://www.newdomain.com to point to newdomain.com via dns

    Try deleting that...

    Let me know if that works.

    Awaiting your reply,
    Ari.

  • PC
    • WPMU DEV Initiate

    Hello @timvb

    Greetings and thanks for posting back.

    Do you know if it's even possible for this domain mapping tool to be setup on a network when the main network url is itself a subdomain ?

    To be true, I have never tried it personally but I have a couple of questions.

    1: What are the actual domain names in question ?
    2: Are you able to visit the subsites you have created in the multisite ?

    Please advise.

    Cheers, PC

  • aristath
    • Recruit

    Do you know if it's even possible for this domain mapping tool to be setup on a network when the main network url is itself a subdomain ?

    I just confirmed it with Barry, the plugin developer. Yes, it is possible to use the domain mapping plugin on a network when the main url is a subdomain.

    Cheers,
    Ari.

  • Paul Barthmaier
    • Code Wrangler

    @timvb,

    two things:

    1. I haven't heard that you actually mapped the domain to your subsite, under the subsite's Tools > Domain Mapping
    2. You can still build a multisite off of the main tld even if it's in use. I assume you own it, if you're building a subdomain off of it.
    If your naked domain and your www are reaching your the main site of your subdomain multisite, that suggests to me that things are working well up to that point. That is, once it gets there it's going to look into the blogs table in the database for where to go next and if you haven't mapped the domain it'll just stop looking and sit there!

    Cheers,
    Paul

  • timvb
    • Design Lord, Child of Thor

    For some reason, the domain that I was trying to map wasn't saving .. I have just updated the domain and deleted it .. then updated it again and it's working .. I'm sorry that I don't have a better explanation other than this... I'll update this topic if I find more information later.... It's possible that something odd is happening on the cloud structure of this installation ... maybe some kind of cacheing issue ??

  • PC
    • WPMU DEV Initiate

    Hiya,

    Sorry for not being able to get to your post earlier as I was away for a vacation.

    Its glad that the issue is fixed. It might have been a DNS issue from what I think however we would be glad to know if you find the cause of the same and share it with us :slight_smile:

    Cheers, PC

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.