How does the domain mapping handle canonicalization of domains?

I have a site that has 5 other "alternate" domains that they use. Currently they are doing a serverside rewrite to mask the domain. We are having a duplicate content issue as WP is passing the canonical url for the displayed url. So, if xyz.com is the primary, but abc.com is an alternate url, if it gets crawled as abc.com then abc.com gets set as the canonical url and not xyz.com and so the branded site which should be the canonical url for all alternate domains and therefore all link juice and authority.

Aside from installing Yoasts SEO plugin and page by page setting the canonical url manually I do not see a work around. I am hoping that your multi-domain plugin will resolve this.

  • aecnu

    Greetings DigitalPure,

    Thank you for this great question and a significant item to bring up.

    However, I have no idea if Multi Domains will address the canonicalization issue at all.

    Therefore I will see if I can get the lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • David

    Yeah, I have not seen any plugins aside from Yoast SEO that allows me to hardcode the canonical url of a page so that other domains do not do this. 99% of the time I just 301 the .net/org/etc to the primary and it is not an issue. This is a special case though where the address bar needs to read the new domain even though the page is the same.

    I am cool with waiting. I realize this is unique, but this would be a game changer if you had a plugin that did this.

  • Vladislav

    Hello,

    Unfortunately, the current stable version of the plugin won't do anything special to help with this scenario. However, the attached updated version should allow you to define one domain as the "canonical" domain, and use that as the domain for canonical links. To define a domain as canonical, you should add a line like this to your wp-config.php:

    define("MD_CANONICAL_DOMAIN", "mydomain.com", true);

    ... where "mydomain.com" is the main domain you wish to use. The plugin will then a) remove the default WordPress canonical link elements from the head section of your pages, and then b) supply a canonical link on its own, replacing all the other domains with the one you defined as canonical in previous step. Can you please give it a go and see if it helps with the issue for you?

    Please, note that this replacement will work for default WordPress canonical links. If you have a plugin or a theme that replaces it with a canonical element on its own, it will override this behavior.

  • Kimberly

    Hi!

    Just checking in :slight_smile:

    I'm guessing that because we haven't heard back from you that you've got your issue worked out via live chat or email, or that we have reached the end of our convo here. If you are still having problems or need any other answers on this particular topic please feel free to come back to this thread at anytime. Just be sure to mark it Not Resolved so we don't miss it!

    This ticket is only being Resolved due to lack of activity. It is by no means an action to avoid, brush off or minimize your issue. We are ready and here if you want to re-open at any time and I apologize in advance for any lack of communication if this ticket is being closed in error.

    Thanks for being part of the WPMU DEV Community!

    Best,
    Kimberly

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.