Question

When I use multi-site Wordpress on a droplet with two domains, adding a site redirects to the other domain's wp-signup.php.

  • Posted on August 6, 2014
  • benroth2Asked by benroth2

As in the title, I have two domains on my droplet. I can create sub-sites on the first with no problems, but when I create a sub-site and then try to go to it, I’m redirected here instead:

http://www.site1.com/wp-signup.php?new=test.site2.com

Additionally the signup page isn’t what should load once I’ve created the site via Network Admin–it should go directly to the new site instead. Creating sub-sites on site1 works fine using this approach; I add a site via Network Admin, then can immediately go to it with no problems.

Any ideas on this? The .htaccess file for each site was copied directly from the Wordpress Network Admin settings, as was the chunk of the wp-config.php file for each.

Here is my breakdown of the DNS info:

site1:

A: @ / IP A: site1.com /IP CNAME: www /@ CNAME: * / IP

site2:

A: @ / IP A: site2.com / IP CNAME: www / @ CNAME: * / @

Any thoughts on what could cause this?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

It sounds like this might be an issue with your Apache VirtualHosts. Could you post them here?

www.site1.com seems to be the default server in your Apache configuration. If Apache doesn’t recognize the the ServerAlias it will redirect to the default server. When the WordPress installation at www.site1.com recieves a request for test.site2.com it doesn’t exist. This then triggers the redirect to the signup page.

Make sure your VirtualHosts contain:

ServerAlias *.site1.com

And of course change *.site1.com to *.site2.com for the other VirtualHost.

In general, if you want to disable the redirection to the signup page, you can set NOBLOGREDIRECT in your wp-config.php files:

define( 'NOBLOGREDIRECT', 'http://example.com' );

22

4 I migrated content from our production server to our dev server in an attempt to sync all environments. I used the All-In-One WP Migration plugin.

Now, when I access dev.domain.com I am forwarded to http://dev.domain.com/wp-signup.php?new=dev.domain.com

It sounds like one of the database values must be incorrect and WordPress is forwarding me here because of it. If I disable Multisite, everything seems to function properly.

Here is my .htaccess:

<FilesMatch “(.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$”> Order allow,deny Deny from all Satisfy All </FilesMatch> <FilesMatch “^(wp-config.php|readme.html|license.txt)”> Order allow,deny Deny from all Satisfy All </FilesMatch> and my wp-config:

/** Multisite / Wordpress Network / define(‘MULTISITE’, true); define(‘SUBDOMAIN_INSTALL’, true); define(‘DOMAIN_CURRENT_SITE’, ‘dev.domain.com’); define(‘PATH_CURRENT_SITE’, ‘/’); define(‘SITE_ID_CURRENT_SITE’, 1); / fix for Multisite ‘SubDomains’ - Not Working for me :( */ define(‘ADMIN_COOKIE_PATH’, ‘/’); define(‘COOKIE_DOMAIN’, ‘’); define(‘COOKIEPATH’, ‘’); define(‘SITECOOKIEPATH’, ‘’);