Domain Mapping not working

Greetings! I'm doing something wrong here with the Domain Mapping plugin, but not sure what. Two issues: DNS mapping errors and HTTPS errors.

I'm testing two domain mappings:
learn.governmentseo.com - host CNAME value is http://www.citycommerce.org
shop.governmentseo.com - host A record value is 18.220.34.98

Via direct navigation in a browser, they both resolve as https://www.citycommerce.org/, not as they are mapped to directories in the WPMU site and plugin. I have opened support access so the plugin setup can be reviewed by wpmudev support team.

The plugin mappings look like this in WP:

URL: http://www.citycommerce.org/governmentseo - Mapped Domain: learn.governmentseo.com

URL: http://www.citycommerce.org/shopgovernmentseo - Mapped Domain: shop.govermnentseo.com

As an example result for "shop.", I can see server headers are first 301 redirecting http://shop.governmentseo.com/ to http://www.citycommerce.org/, then 301'ing to https://www.citycommerce.org/. The "learn." test results are the same.

I'm using Ubuntu 16, the Apache2 sites-available file contains this:

===============================
<VirtualHost *:80>

ServerName citycommerce.org
Redirect permanent / http://www.citycommerce.org/

</VirtualHost>

<VirtualHost *:80>

ServerAdmin webmaster@citycommerce.org
ServerName http://www.citycommerce.org
DocumentRoot /var/www/citycommerce.org/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

RewriteEngine on
RewriteCond %{SERVER_NAME} =www.citycommerce.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
===============================
I suspect the server redirects may be causing problems? Or perhaps something needs to be added to receive the mapped domains and direct to the WPMU instance?

Bonus! Additional HTTPS issues:

I'm using LetsEncrypt to secure the http://www.citycommerce.org domain. In WPMU I chose to use directories instead of subdomains to allow the secure certificate to work once on the domain ... instead of issuing a new certificate for every new subdomain spawned.

Although, I'm guessing a secure certificate should also be issued for each of the domains that intend to resolve in the browser ( learn.governmentseo.com and shop.govermnentseo.com)?

From the WP Sites Dashboard (/wp-admin/network/sites.php) I can click "visit" on http://www.citycommerce.org/governmentseo and see learn.governmentseo.com resolve with the right content, however HTTPS breaks. Again, this is the test with the CNAME setup.

Also from the WP Sites Dashboard, when clicking on "visit" for http://www.citycommerce.org/shopgovernmentseo, I get a "DNS address could not be found error" for https://shop.govermnentseo.com/.

I'm open to any ideas to fix the DNS resolution and HTTPS errors, thanks in advance for the assist!

  • James Morris

    Hello Steven,

    I hope you are well today.

    There's a number of issues here that I'd like to address, but first I'd like to help you resolve the shop domain. In order to help you better with your issue, would you please grant me access to your site and server?

    Please visit the Contact page and complete the form with the following information:

    Subject: "Attn: James Morris"

    In the Message box, please provide the following:

    - link back to this thread for reference
    - any other relevant urls

    - Admin login:
    Admin username
    Admin password
    Login url

    - Domain Registrar Login
    Admin username
    Admin password
    Login url

    - Hosting Control Panel Login
    Admin username
    Admin password
    Login url

    ~OR~

    - FTP credentials
    host
    username
    password
    (and port if required)

    Best regards,

    James Morris

  • James Morris

    Hello Steven,

    I certainly understand your concern. Please let me assure you any details you share with us staff here at WPMU DEV is kept in the strictest confidence, and we use the greatest care when working on member's sites.

    While we're always happy to offer advice in the forums, sometimes it takes looking under the hood to help resolve problems. In your situation, this is necessary because your initial details point to a misconfiguration of either the site, server, DNS or any variation thereof.

    For example, CNAME records generally don't work with http://multisite.com/subsite model but rather works with the http://subsite.multisite.com/ model. The A Record, Add-on/Parked methods are preferred for subdirectory installs.

    Therefore, for me to properly determine where the problem is in your configuration, I need to have access to the site, server and DNS to perform some diagnostics. If you have concerns about who I am, please see my profile page.

    Alternately, you can speak with one of our other Support Specialists directly via Live Support, but I'm afraid the same information will eventually be requested in your situation.

    If you will not provide access to staff here at WPMU DEV to help diagnose your problem, I'm afraid there's not much we can do to help resolve your issue. Unfortunately, it's extremely difficult to diagnose such complex issues blind.

    I hope this clarifies a bit.

    Best regards,

    James Morris