humanmade / Mercator

WordPress multisite domain mapping for the modern era.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Difference between Mercator and WP-native domain mapping?

ErinPo opened this issue · comments

Current version of WP has native domain mapping capability. What is the difference with Mercator?

Hi there, I'm still exploring Mercator as well, but my understanding is that native Domain Mapping is a one to one thing, whereas Mercator allows for aliases, or a one to many mapping.

Interesting, although I can't think of a situation where a one-to-many mapping would be useful. If, say, I have a domain.com and domain.net and only wanted to use one, the proper thing to do would be to 301 from one to the other, not serve the same website under two different domains.

Any other scenarios where this is really useful, or other differences between Mercator and native domain mapping, anyone?

@pbrocks is correct: Mercator is for domain aliasing, core can do the mapping itself.

There's a number of situations where this can be useful. The original use case for us was for a hosted multisite, where users get a {username}.oursite.example, and can map another domain. We needed to keep the subdomain around for the administration, but allow access from the other domain.

This also applies to your case in #88 (comment) - multisite doesn't have aliases natively, so you can't map both example.com and example.net to the same site to do the redirects. Mercator + Mercator-Redirect will do this for you, as well as correctly loading plugins for the site in case you want to do more complex redirects or operations.

For the most part, Mercator is designed to be a base for building complex domain interactions into multisite. If all you need is a custom domain in WP, you probably don't need Mercator.

Great info, I appreciate it!