I was in a similar situation recently. I ended up putting the root site on a random subdomain (eg ms.domain.com
) With the intention of never using the root site.
With that done, I created a plugin to activate only on the main (root) site.
The plugin hooks into a action that fires only on the front end (template_redirect
). From there, call wp_redirect
to send your visitors to where they need to be.
<?php
add_action('template_redirect', 'wpse52298_redirect');
/*
* Redirects all requests to the front end to another site
*
* @uses wp_redirect
*/
function wpse52298_redirect()
{
// change this
$to = 'http://www.example.com';
wp_redirect(esc_url($to));
exit();
}
Cons:
- Loads basically all of WP before redirecting
- Not as fast as redirecting in htaccess
Pros:
- Easy to maintain
- No htaccess foo required
As a plugin.
Related Posts:
- WordPress Multisite with multiple domains using Nginx
- Multisite on single wordpress
- How to use WordPress Multisite With Different Domain Names?
- Multisite Network Port Num Issues?
- Anyone figured out how to use WordPress MultiSite with Domain Mapping & SSL?
- Can a multisite’s blogs be accessible from two different sub-domains?
- WP Multisite development with Mamp Pro and wildcard subdomains, not really working for me
- Domain mapping (without plugin) in 4.5.x multisite?
- Multisite Domain Mapping with SSL
- How to set up wordpress domain mapping on MAMP Pro
- How do I transition multiple installations to a single Multisite installation?
- How to use alias domain for multisite installation?
- Steps for Moving Multiple WordPress Installs to a Multisite Install?
- Multisite behind Varnish
- MU domain mapping login issue
- Generate WP-CLI @alias for each site on multisite
- sunrise.php for multi-network install of domain mapping plugin
- Infinite loop problem with the WordPress MU Domain Mapping plug-in
- Is it still only possible to do multisite domain mapping with a plugin in WordPress 4.1?
- How to manage multiple domain with different languages on each domain with single wordpress installation?
- “Preview Changes” button doesn’t show changes for previously published posts/pages
- Broken image multisite
- How to add new sites and map a custom domain in WordPress Multisite?
- WordPress multisite with different domain
- Changing Multisite URL after the subsite has been in use
- Trying to migrate a WordPress Multisite with Domain Mapping
- Multiple blogs, different domain names, one install to rule them all
- W3 Total Cache – How to disable “Performance” menu under multisite? [closed]
- How do I use different domain for subdomains in WP Multisite?
- Subdomain and subdirectories together in one installation
- subdomain mulitsite on localhost in a subfolder
- WordPress Network for regional company websites
- How to do Domain Mapping to Subdirectories?
- Possible to create a multisite network where the main site is non-WP?
- How do I park secure.primary.com on top of the multisite ID:1 domain: www.primary.com (primary multisite domain)
- Multiple domains with different child themes on one installation?
- WordPress MU Domain Mapping Customizer Error
- Changing admin sub-domain in WordPress multisite
- Why are images uploaded to main domain, when using multisite with different domains?
- Alias domain to Multi-site installation in Apache
- WordPress multisite with multiple parent domains
- WP 4.4 – domain mapping for sites within a multisite network?
- How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url
- WP MU – Accessing ‘Domain-Mapped’ WP-Admin with a subdomain
- Does WordPress MultiSite use separate MySql databases?
- WP Multisite – domain mapping to domain.com and separate site to domain.com/help
- Child Site doesn’t appear in the Network menu
- Create rewriterules for different domains in htaccess file with WP multisite
- WordPress with Lan and Wan Access?
- Multisite domain naming
- How to host blog on separate domain from main site
- wp-config dynamic hostname in WP_HOME and WP_SITEURL
- WordPress MU Domain Mapping Just Redirects to Main Site
- Migrating wordpress multisite and domain mapping plugin
- WordPress Multisite domain mapping with different IPs
- WordPress Multisite Strange Redirect on Primary Site
- WordPress Multisite with Addon Domains (not parked domain) [closed]
- Mapping domains to WordPress network installed on subdomain
- WordPress 4.5+ Multisite Domain Mapping
- Link structure, WordPress IIS
- Multisite – Parent site with Polylang with different domains for each language [closed]
- Viewing / Editing A Multisite website after domain has expired
- WordPress Multisite + Erros with URLS and ADMIN
- What are good approaches to routing some urls to a second WordPress install?
- How can I use separate domains for single pages?
- Login problems on multisite installation with different domains
- Is this a job for WP MultiSite with domain mapping plugin?
- MU/Subdomains + Domain Mapping + SSL?
- network site domain mapping still applied after being removed
- How to set up wordpress domain mapping on MAMP Pro
- Domain Mapping for WordPress MU and https redirection – How to?
- Canonical Resource URLs Across a Multisite Network 2012?
- Multisite domain mapping breaks CSS
- WordPress MU subdomain vhost
- Domain mapping with Multisite links are wrong
- Changed sub-site to its own domain trigger 302 redirects for all page links
- How to Deny Access to No Referrer Requests on Multiste with Mapped domains
- Install multisite wordpress on a subdomain and map to top level domains
- Multisite – One Site with multiple URLs
- Sub-sub folders of WordPress Multisite subdirectory
- 403 forbidden when changing settings on WP Multisite non-main sites
- Different Domains in Multisite Setup
- How to use the sunrise.php script for Multisite network domain mapping?
- WordPress Multisite with subdomains on different domains
- Check if current site ID and value exist in WPDB
- WordPress multisite with domains and subdomains
- Domain Mapping subsites of an Add-on Mulsite Domain
- Change WordPress Multisite Domain
- Forward and mask a WordPress website
- Folder structure when using multiple domains with WordPress
- Infamous admin login redirect
- How to Force WWW. in Domain With WordPress MU Domain Mapping Plugin?
- wordpress multisite domain mapping redirects to original subdomain
- Problem with new Multisite Installation
- WP-Cli Error When Mapping Multisite Subdomain
- WordPress Multisite and how to apply sef urls only to specific sites
- Change main site / network admin site?
- multisite installed on subdomain now want another subsite on subdirectory
- Migrating from domain mapping plugin to native domain mapping
- Serve theme and plugins assets from correct domain on multi-domain multisite