Domainer

Domain mapping management for WordPress Multisite.

Author:Doug Wollison (profile at wordpress.org)
WordPress version required:4.0
WordPress version tested:5.4.4
Plugin version:1.2.1
Added to WordPress repository:28-04-2017
Last updated:12-07-2020
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:86
Rated by:12
Plugin URI:https://github.com/dougwollison/domainer
Total downloads:3 875
Active installs:10+
plugin download
Click to start download

Domainer lets you route custom domain names to specific sites on your Multisite installation. That’s it.

Domain Options

Each domain has 4 options you set:

  1. The target site; pick from a list of existing sites on your network.
  2. A type, choose from one of 3 flavours:
    • Primary: sites with a primary domain will have their URLs redirected to them.
    • Redirect: these domains will always redirect to the primary domain, or the original failing that.
    • Alias: these won’t redirect to the primary, so they’re bad for SEO but can be useful for certain setups.
  3. A www rule, choose from one of 3 options:
    • Always: always redirect to the domain with www at the front.
    • Never: always redirect to the domain without www at the front.
    • Auto: allow the domain to function with or without www, usually bad for SEO.

Content Rewriting

In order to reduce redirects while navigating the site, Domainer will replaced all instances of the site’s original domain name on the pages to that of the primary domain, or currently requested alias domain. This will not affect email addresses however; any filters on the content will only replace instances starting with a double slash so as to match URLs.

If you find instances of the domain not being replaced, such as in content filtered by 3rd party plugins, you can patch it with this function:

add_filter( 'my_filter', 'domainer_rewrite_url' );

The function can also take a domain or array of domains to replace, as well as a specific domain to replace with.


ChangeLog