Domain Mapping Redirecting to Main Network Site instead of Subdirectory

Hello and Happy New Year,

I’ve recently installed the Domain Mapping plugin and followed instructions from this post https://wpmudev.com/blog/offer-your-multisite-users-unique-domains-with-domain-mapping/ . I have a dedicated IP, have set up the A record, parked the domain and worked settings of the plugin.

My issue is that I’d like contents from everythingwellness.com/test001/ to show when users visit nolazydays.com. Instead, nolayzdays.com is redirecting to the main site of my network (everythingwellness.com). I’ve read a number of support threads and tried troubleshooting without any success so far. Not sure what I’m missing. Some details below.

Network: everythingwellness.com

Subdirectory being mapped: everythingwellness.com/test001/

Mapped Domain: nolazydays.com

Hosting: BlueHost pro account with a dedicated IP address and SSL

Please let me know what additional information I can provide to help resolve my issue. Thanks in advance for any help you can provide.

Matt

  • Adam
    • Support Gorilla

    Hello Matt,

    I hope you’re well today and hank you for your question!

    I took a liberty of accessing your site’s dashboard. I screened Domain Mapping settings on both your Network Admin and the mapped site’s Dashboard. This seems to be all fine.

    Therefore, I think the “glitch” is with your Domain Configuration here. Is the “nolazydays.com” domain hosted outside of the server that your site is (so you setup DNS A record elsewhere)?

    Assuming it is, I’d try following (I’m pretty sure some of these steps are already completed but it’s always better to double-check):

    1. Make sure that the “root folder” for your IP address is set to the “root folder” of your Multisite install; as a result, when you type an IP address into the browser’s address bar the main site of your network should load (don’t worry if it’d be “broken”:wink:

    2. Remove mapping

    3. Remove add-on domain from your server; make sure that it’s only setup on DNS via A record to point to your fixed IP address

    4. Map the domain back

    Let me know please what was the result of this.

    Best regards,

    Adam

  • Matt
    • New Recruit

    Hello Adam,

    Thanks for the quick response. You are correct that nolazydays.com DNS is managed outside of my Bluehost hosting. The domain is managed with tierra.net.

    I worked through the steps you outlined and nolazydays.com is still redirecting to everythingwellness.com (main site of network).

    Some notes…

    -The IP address did load the main site of my network when I typed it in the address bar.

    -There were a few other DNS entries for nolazydays.com (an extra A record for my IP address and a redirect to the IP Address.) I deleted both so there is now only 1 A record.

    Ideas on what to try next?

    Thanks for the help.

    Matt

  • Adam
    • Support Gorilla

    Hello Matt,

    Thanks for your replay!

    I reviewed settings of your site once again and since either it’s setup correctly or I’m may be missing something here, I asked plugin developer to take a look and give me some tips on this. Please note though that his response time may be a bit longer than mine here on forum so it would be great if you could keep an eye on this thread and I’ll keep you updated once I get a response.

    Best regards,

    Adam

  • Adam
    • Support Gorilla

    Hey Matt!

    I just got few suggestions from the developer. Could you please double-check the following things?

    – make sure that you moved (moved, not made a copy!) a “sunrise.php” file from

    “/wp-content/plugins/domain-mapping/” folder to “/wp-content/” folder

    – make sure that inside the “wp-config.php” file there is this line:

    define('SUNRISE', 'on');

    The line should be placed right above the /* That's all, stop editing! Happy blogging. */

    Otherwise it may cause problems.

    Let me know if it helped, please!

    Best regards,

    Adam

  • Matt
    • New Recruit

    Hey Adam,

    Thanks for getting back with me. I had copied sunrise.php instead of moving it. I’ve now moved it and relocated

    define('SUNRISE', 'on');

    within my wp-config.php.

    After doing that, I deleted the nolazydays.com mapping within my /test001/ site and then re-mapped it. Unfortunately, still the same results.

    Matt

  • Matt
    • New Recruit

    Adam,

    .htaccess below.

    # Use PHP5.3 as default
    AddHandler application/x-httpd-php54s .php

    # BEGIN WordPress
    RewriteEngine on
    RewriteBase /
    RewriteRule ^index.php$ - [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).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
    RewriteRule . index.php [L]
    # END WordPress

  • Adam
    • Support Gorilla

    Hello Matt!

    Still, nothing unusual in that setup. I think I'll need to take a much closer look if you don't mind. That said, could you please send in:

    Subject: "Attn: Adam Czajczyk"

    – your site's WordPress admin login URL

    – admin login and password (may be a temporary account)

    – FTP credentials (hostname, username, password, port number if needed)

    – any other relevant URLs and information

    – link back to this thread

    Please use our contact form here https://wpmudev.com/contact/.

    Select "I have a different question" from the drop-down list.

    Please be sure to make a full backup of your entire site first!

    Best regards,

    Adam

    [attachments are only viewable by logged-in members]

  • Josh-VisionIntoDestiny.com
    • The Incredible Code Injector

    Following this thread. I am having the exact same issue with SiteGround.com and external DNS records. Their tech support issued me these instructions using cPanel.

    They said:

    In order to use external DNS zone and have the subdomains loading from the account here, you need to:

    1) Remove the DNS zone entry you have created within the DNS editor:

    Code:

    *.yourwebsite.com. 14400 IN A 111.222.333.444

    2) Create a WildCard subdomain for yourwebsite.com:

    Code:

    *.yourwebsite.com to point to home/yourwebsite.com/public_html

    which is the root folder of the domain

    The actual WildCard subdomain you set will automatically set the A record as well, and it from there will detect the proper root folder, so it will be associated with the addon instead of the primary domain.

    ******End of Tech Response

    Of course this didn’t work.

    Additional Info:

    My server is hosting multiple sites.

    / (root has a single install WP site )

    multisite1.com (within root. abspath is home/multisite1.com/public_html)

    multisite2.com (within root. abspath is home/multisite2.com/public_html)

    One of my sites (example multisite1.com) does not have domain mapping installed but resolves just fine when using shop.yoursite1.com

    The other site multisite2.com has wpmudev domain mapping and pro sites installed. Primary domain resolves fine and subdomain site resolves fine (subsite.multisite2.com) but mapped domains do not. Health Status shows “Invalid” for mapped domain.

  • Adam
    • Support Gorilla

    Hello Matt,

    I checked your site again and then tried to further investigate the issue. I wasn’t however able to access your server. I sent you an e-mail response on this. Please check your e-mail.

    @Josh,

    This is a different issue. Please make sure that the site for which Domain Mapping isn’t working is using a separate IP than other sites. If this doesn’t help, please start a new thread of your own on our support forum here:

    https://wpmudev.com/forums/#question

    Best regards,

    Adam