Multiple Domain Mapping on Single Site

Description

What does this plugin do?

This lightweight plugin maps domains to specific URIs in your blog or website. It allows you to add as many landingpages as you want.
Just let the domains point to your WordPress installation (see the installation tab for details) and decide which URI the plugin should hook them to.

Who is this plugin for?

The main purpose of the plugin is to have specific domains point to specific pages from a bigger website. This is especially needed for marketing and SEO purposes. Think of a site-structure like

  • www.mainsite.com
  • www.mainsite.com/productA
  • www.mainsite.com/productB

With the plugin you can use an additional domain like www.productA.com to point to your site’s www.mainsite.com/productA.
It is not only a redirection, instead the additional domain will display the content from the specified page (the additional domain will be visible in the browsers address bar).

Who is this plugin not for?

The plugin requires additional steps in setting up your domains and hosting environment (see the installation-tab for details). If you are not familiar with these settings, it can happen that you have troubles with reaching your website. Therefore you should only set up the plugin in a testing environment if you are not sure if you can deal with these external settings.

Which Pages, Post Types, … does the plugin support?

The plugin lets you define URIs to map to, so it works for pages, posts, custom post types, archives and so on. The plugin also changes hyperlink destination of the autogenerated links, which point to the URIs. For example: post navigation links, menu links, category page links and so on. (Note: This only works if your theme and other link-generating plugins use standard WordPress functions).

So you will not have to select posts to map to your domains, but instead enter URIs. See the screenshot-tab for examples.

Does the plugin support WooCommerce, Yoast SEO, …?

Please see the FAQ for information on plugin compatibility.

Troubles?

Please see installation-tab, FAQ and the already answered support threads for more information or if you have troubles setting up the plugin.

Screenshots

  • Your WordPress runs on www.maindomain.com. You have a special product landingpage, which will now be accessible through the special domain, as well as your team page.
  • Your main site has a page for a restaurant and a custom post type "dishes" with post "beef". Everything beneath /restaurant, like /restaurant/menu will be accessible through http://restaurant.com, except /restaurant/dishes/beef, which will be changed to http://beefdishes.com
  • How to setup mappings for a https-domain, if it does not work with the https-line alone.

Installation

1. External Setup

Make sure that the domains you want to use already point to your WordPress installation root. This requires two steps:

  1. The A-Records of the used domains must have the same IP address assigned as your main domain. This is usually done in the DNS-Settings of your domain registrar.
  2. In your hosting environment, you must configure all domains to point into the same directory as your main domain (usually your WordPress root directory). This is sometimes called virtual hosting, multidomain, domainmapping, domain alias, …

2. Plugin Installation

  1. Upload plugin-folder to your “/wp-content/plugins/” directory.
  2. Activate the plugin through the Plugins-menu in WordPress.

3. Plugin Setup

After you have the “External Setup” complete, all your domains will show your WordPress home page.

  • If not, do NOT start to enter mappings in the plugin options – it will make troubleshooting worse.,
  • If so, begin to enter your domains and the URIs they should match in the settings, located in the Tools-Menu. See screenshots for examples.

FAQ

Installation Instructions

1. External Setup

Make sure that the domains you want to use already point to your WordPress installation root. This requires two steps:

  1. The A-Records of the used domains must have the same IP address assigned as your main domain. This is usually done in the DNS-Settings of your domain registrar.
  2. In your hosting environment, you must configure all domains to point into the same directory as your main domain (usually your WordPress root directory). This is sometimes called virtual hosting, multidomain, domainmapping, domain alias, …

2. Plugin Installation

  1. Upload plugin-folder to your “/wp-content/plugins/” directory.
  2. Activate the plugin through the Plugins-menu in WordPress.

3. Plugin Setup

After you have the “External Setup” complete, all your domains will show your WordPress home page.

  • If not, do NOT start to enter mappings in the plugin options – it will make troubleshooting worse.,
  • If so, begin to enter your domains and the URIs they should match in the settings, located in the Tools-Menu. See screenshots for examples.
Can I use “Multiple Domain Mapping on Single Site” with a WordPress multisite?

No, you should not use the plugin with a WordPress multisite installation. There are other plugins for that purpose. This plugin is only used to map domains on a single-site installation. If you are not sure if you should use a single- or multisite installation, please refer to the WordPress Codex:
If you plan on creating sites that are strongly interconnected, that share data, or share users, then a multisite network might NOT be the best solution. from WordPress Codex

We did not test the plugin in a multisite environment and can not help you with your support questions regarding such a setting.

Why am i logged out when viewing pages/posts/… with mapped domains?

If you are on the frontend of your site and logged in, it will happen that you do not see the admin bar and seem to be logged out when viewing URIs with mapped domains. This is because WordPress uses cookies to save the login-state. These cookies have your main domain saved and so they are not able to recognize you logged in when viewing URIs with mapped domains.

Does the plugin support german “Umlaute” like ä/ö/ü ?

Yes, and since version 0.1 there is also a How-To included in these FAQ: You have to define these domains in the IDN format. For example the domain www.küche.at would need to be put in as www.xn--kche-0ra.at. You can use the Verisign IDN Conversion Tool to find out these representation for your domains.

Maybe we will include an automatic conversion like Punycode.js in a future release, if you would like it.

Does the plugin support https – connections?

If you have set up all your domains and certificates correctly, the plugin will work with https-connections as well. Watch out to enter the correct protocol (http vs. https) in the settings. If you do not have a certificate for your additional domains, you must enter them with http. Do not try to have a certificate only for an additional domain but not for the main domain: Browsers will detect mixed content and display security warnings.

Its best to have all or none of your domains SSL-secured.

Some server-setups require that you enter both the http and https version in your mappings – we will try to fix this in future releases. In the meantime, refer to the according screenshot to see the correct sequence.

Does the plugin support Yoast SEO XML sitemaps?

The XML sitemap functionality from the popular Yoast SEO plugin works with this plugin. Instead of those original URLs, the sitemap shows the mapped domains. As the plugin hooks into various link-generating methods, also other sitemap-plugins which use these standard-functions should work with this plugin.
Version 0.1.2 fixed some problems with specific types in the Yoast XML sitemap.

Sometimes it is necessary to disable and re-enable XML-Sitemap functionality in the Yoast SEO settings in order to reflect the mappings.

Does the plugin support WooCommerce?

Unfortunately not – some parts work, some not. It is difficult to find out and by now we do not see a chance for us to take the time needed for good support and compatibility. WooCommerce seems to use a lot of link-generating functions that are not in WordPress core. This seems to be necessary for different product types and so on. On top, also the XML sitemaps from Yoast SEO display some links mapped and some not.

If you want to use custom domains for parts of your WooCommerce store, this plugin is not (yet) the right decision.

Why do my custom fonts not show up?

Although the plugin changes the include paths of scripts and styles to the mapped domains, it can happen that paths inside css-files still refer to your main domain. If your webserver is configured to disable scripts, fonts, … from other domains, these resources will be blocked.

Here is a support-thread that describes how to setup CORS to enable cross-domain ressources: CORS-Setup

How can i trock cross domains in Google Analytics?

This is pretty complex and we can not support you here. This article will help you: Cross-Domain Tracking with Google Analytics

Reviews

Web Weaving Made Easy

As reviewed on [link removed]

If you have a stand alone website and a few extra domains (lets be real who doesn’t) then you can use this to map them to specific splash pages or special spots on your site. It works quite well setup fast just a great plugin.

Easy to use

A simple and easy to use plugin!
Super fast support too.

Great Support and Follow Up

Had a couple of issues with the Plugin and Yoast SEO. Plugin developer addressed the issues and kept us informed of developments. All good.

Essential

Very advanced plugin. It is hard to look for alternative that is free and supported actively by developer.

i love my plugin ^^

we developed this plugin for internal use because it was necessary for some clients. now, we love to work on it and give back something to the big wordpress community 🙂

Read all 11 reviews

Contributors & Developers

“Multiple Domain Mapping on Single Site” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

0.1.3.1

  • removed feature: “Change various include paths (scripts, styles, images) to mapped domain” as it is more difficult then expected

0.1.3

  • Change various include paths (scripts, styles, images) to mapped domain
  • Removed some PHP Notices
  • Added some FAQ

0.1.2

  • Additional post type and archive link support
  • Better support for Yoast SEO
  • More information on installation and setup, FAQ, screenshots
  • More information for setting up mappings on the backend
  • Added compatibility settings for rare server incompatibilities
  • Bugfix when having mapping-URIs which had the same characters in the beginning

0.1.1

  • Removed a function that was used for testing automatic IDN conversion, but was incompatible with php 5.3

0.1

  • Cleaned up code
  • Cleaned up admin page
  • Removed +/- Buttons to avoid the use of JavaScript
  • Added text domain to strings
  • Added support for german Umlaute as described in the FAQ
  • Added Banner and Icon
  • Moved the settings page into the Tools-section

0.0.1

  • Initial release