WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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

I have Multisite enabled and can only view my site with the www. When I try without the www it sends me to the sign-up page and says

Registration has been disabled.

www.domain.com/portfolio  <-- load correctly
domain.com/portfolio      <-- redirects to sign-up page

I've tried NOBLOGREDIRECT, but nothing changes.

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

In .htaccess, I've also tried the following with no success.

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

How do I get my site viewable with and without the "www." in the domain?

share|improve this question
what's on your Settings -> General Settins for: -> WordPress address (URL) -> Site address (URL) check that you don't have www in those two urls – Azizur Apr 11 '11 at 11:34
@Azizur that option doesn't appear in 3.1.2 multisite. – Andrew Apr 27 '11 at 6:59

The answer is here: Domain redirect in Wordpress multisite.

You need to use the domain mapping plugin.


A must read http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/

share|improve this answer
+1, I'm using the domain mapping plugin with subdomain install and the OP's RewriteRule in my apache virtualhost conf. – Andrew May 2 '11 at 2:30

@jaysonp, you were really close but in your Rewrite rule you forgot the www.

Add this in your htaccess file right under RewriteEngine On

RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
share|improve this answer

The solution for me was in the end very simple: within the Domain Mapping plugin referenced by Azizur's answer above, I added a new domain without the www and the same site ID as the www version. I unchecked primary. The result is two entries for the same site (in my case site ID 2), as follows:

ID: 2
Domain: www.domain.com
Primary: Yes

ID: 2
Domain: domain.com
Primary: No
share|improve this answer

Your Answer


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