WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a multisite setup, the primary domain needs to have domain.com, www.domain.com and secure.domain.com mapped in wordpress so the primary site's content loads on them. The problem we are facing is everything except secure.domain.com works. secure.domain.com always ends up at: http://www.domain.com/wp-signup.php?new=secure.domain.com

The headers returned from the server are as follows:

Status: HTTP/1.1 302 Moved Temporarily Date: Tue, 16 Oct 2012 19:55:53 GMT
Server: Apache
Location: http://www.domain.net/wp-signup.php?new=secure.domain.net
Content-Length: 0
Connection: close
Content-Type: text/html; charset=utf-8

share|improve this question
What domain mapping solution are you using? i.e. which plugin, if any? – marfarma Oct 16 '12 at 19:54
Seems you have the same issue as this poster: wordpress.stackexchange.com/questions/14383/… Had you seen that question? Did the proposed solution not work for you? – marfarma Oct 16 '12 at 20:04

Do you have to have secure.domain.com function or can it redirect?

The tl;dr is that you don't. The primary domain is the cheese: it stands alone. However.... You can use .htaccess to check 'If someone is coming from secure.domain.com, send them to domain.com'

RewriteCond %{HTTP_HOST} ^secure\.domain\.com
RewriteRule ^(.*) http://domain.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^www\.domain\.com
RewriteRule ^(.*) http://domain.com/$1 [L,R=301]

That's about as good as it gets. (Mind you, if your server itself doesn't redirect www.domain.com to domain.com, it needs a kick in the pants anyway...)

share|improve this answer
Well, I can't redirect otherwise it would break the SSL connection. The user must remain on secure.domain.com for certain parts of the site that require a secure connection. – Jerry Tunin Oct 17 '12 at 13:37
What are you using secure.domain.com for then? – Ipstenu Oct 22 '12 at 22:32
secure.domain.com (https) is used for forms/applications. The rest of the site is http. – Jerry Tunin Oct 24 '12 at 16:40
Wait... so secure just isn't supposed to be a part of WP at all? They're separate? If so, you should be able to adjust your vhosts so that subdomain is higher up and kicks in before it picks up wildcards. I have a few named subdomains AND wildcards going on, and they never bump uglies. – Ipstenu Oct 25 '12 at 22:24
up vote 0 down vote accepted

In the end I just added the following to .htaccess

RewriteCond %{HTTP_HOST} ^secure\.domain\.net$
RewriteRule (.*) http://www.domain.net/$1 [P,L]

This appears to be working fine, but I'm not sure of what types of unforeseen effects it may have if any.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.