Support » Networking WordPress » Secondary Domains Misdirected on WordPress Multisite

  • Resolved jstallard

    (@jstallard)


    I removed the WordPress MU Domain Mapping plugin last year because it hasn’t been updated for 2 years.

    The primary domains for each blog work fine, but secondary domains always map to the main blog instead of the blog they belong to

    Originally I leased a server and used this kind of syntax in .htaccess to map a blog with 3 secondary domains:
    RewriteCond %{HTTP_HOST} ^(.*\.)?(domain2|domain3|domain4)\.com(\.au)
    RewriteCond %{HTTPS_HOST} ^(.*\.)?(domain2|domain3|domain4)\.com(\.au)
    RewriteCond %{REQUEST_URI} !/wp-admin/
    RewriteRule ^(.*)$ https://primarydomain.com.au/$1 [L,R=301,NC]

    Having just moved to reseller hosting, these directives broke the domain mapping. Every blog on the entire multisite was mapping to primarydomain.com.au!

    I’ve tried Cpanel Redirects but these don’t help.

    UPDATE:
    The Cpanel Redirects are now working – not sure why! Perhaps the DNS needed more time to update. FYI I have the domains redirected both in Cpanel Aliases and Redirects.

    • This topic was modified 7 months ago by  jstallard.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello jstallard,

    Good to know that issue has been resolved.

    Can you add your comment on how it got solved so anyone in the future can refer this is they face a similar issue.

    Thanks

    jstallard

    (@jstallard)

    I didn’t really do anything that would have fixed this but suspect that dns was involved because the problems occurred within 48 hours of the multisite’s hosting transfer.

    My primary domains were .com.au, while the secondary domains I checked were .com domains.

    The .com.au domains started working immediately after the transfer (I’d lowered the TTLs a couple of days before).

    From Australia, .com domains take a lot longer to ripple through the DNS than .com.au domains – about 48 hours.

    At this point the only secondary domain that isn’t working is the one I was testing with. I deleted the A record and tried to create a CNAME to the primary domain. That didn’t work, so I replaced the A record. That’s the only significant change I made. The Cpanel alias, redirect and zone file resemble those of the secondary domains that are working. Therefore, I suspect that the domain isn’t redirecting because I deleted and recreated the A record.

    So the upshot is, if you get this problem and you’re within 48 hours of an IP change, do nothing and try waiting!

    Thank you for sharing the information.

    jstallard

    (@jstallard)

    No problem 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Secondary Domains Misdirected on WordPress Multisite’ is closed to new replies.