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?
- 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 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
- Infinite loop problem with the WordPress MU Domain Mapping plug-in
- “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?
- How do I park secure.primary.com on top of the multisite ID:1 domain: www.primary.com (primary multisite domain)
- 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
- How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url
- 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
- WordPress with Lan and Wan Access?
- How to host blog on separate domain from main site
- wp-config dynamic hostname in WP_HOME and WP_SITEURL
- Migrating wordpress multisite and domain mapping plugin
- WordPress Multisite domain mapping with different IPs
- WordPress Multisite Strange Redirect on Primary Site
- Mapping domains to WordPress network installed on subdomain
- Link structure, WordPress IIS
- 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?
- 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
- Install multisite wordpress on a subdomain and map to top level domains
- 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
- Folder structure when using multiple domains with WordPress
- Infamous admin login redirect
- How to Force WWW. in Domain With WordPress MU Domain Mapping Plugin?
- Problem with new Multisite Installation
- WP-Cli Error When Mapping Multisite Subdomain
- Change main site / network admin site?
- Serve theme and plugins assets from correct domain on multi-domain multisite
- Domain not redirected correctly with WordPress Multisite
- Add file at the root of mapped domain in multisite
- WordPress Multisite – Domain Mapping
- Multisite different domains mapping error on GGS
- SSL for Mapped Domains with WordPress Multisite on AWS
- Multisite domain mapping with SSL redirects to main domain
- WordPress Multi site Map Domains
- new WPMS site not working / Q setting up new site/subdomain
- Multisite with different domain names
- Optimal setup for Multi Domain WordPress with Woocommerce
- WordPress Multisite with cPanel Addon Domains and SSL
- Can WP multisite manage multiple ccTLDs
- How to implement this subdirectory mapping in multisite?
- Domain mapping breaks some plugin scripts and css
- How to configure WordPress for multiple blogs without using multisite?
- Subdirectory and domain multisite installation
- Multisite: Run a subdomain install from a directory install
- WordPress Domain Mapping shows new domain in place but takes me to the sub domain
- MU Domain mapping
- Multisite redirect loop for a single www domain
- Is it possible to put a site other than #1 as a Multisite top-level domain?
- Are there any hosting companies that are already setup and configured for TLD domain mapping?
- WordPress Multisite Subsite WP admin not working
- Best Way to Setup a Network of WP Sites?
- Cookies in Multisite network where sites have their own domain name?
- Map WP Multisite blog.example.com to anotherdomain.com/blog?
- Multisite with Static home page mixed with separate domain name