Support » Networking WordPress » Need www back in domain name

  • Hi,

    After WP 3.1 multisite installation I lost the www’s in my domain. How can I get them back?
    In my browser the URL used to say but now the URL only shows-up as even if you type when the site is loaded it returns to I guess there is a redirect somewhere in the WP code somewhere. I tried to use a .htaccess redirect, like the example below:

    RewriteCond %{HTTP_HOST} !^$
    RewriteRule ^(.*)$$1 [R=301]

    But it didn’t really work, When you typed, it briefly changed to, but then it was changed back to when the site loaded. Also, this seemed to break my other subdomain sites (like which weren’t loading properly after the .htaccess edit.

    I seems like I need to change the domain name under Network Admin, Sites, Info but it’s grayed out.

    How can I resolve this?

    Thanks, ssaral

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Kathryn


    Automattic Happiness Engineer

    This is the code I generally use to redirect non-www URLs to the www version. It sometimes needs slight tweaking depending on the host. Does your host have any support documentation you could check?

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^
    RewriteRule (.*)$1 [R=301,L]

    Your host may also have some server-wide settings that override yours. I recommend contacting them if the above doesn’t work.

    There may also be a multisite-specific factor at work here, which I’ll let someone else address.

    Thanks for your response, I checked with my host (mt) and found the following in their support documentation:

    # To redirect all users to access the site WITH the www. prefix,
    # ( will be redirected to
    # adapt and uncomment the following:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.mt-example\.com$ [NC]
    RewriteRule ^(.*)$$1 [L,R=301]

    When I added the lines to my .htaccess file the site wouldn’t load and I got and error message that read:

    Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.

    Could there be an issue with my DNS Zone file? I do have A records in there for,, and * I will contact the host next.

    Thanks, ssaral

    Moderator Kathryn


    Automattic Happiness Engineer

    Yes, it sounds like there is a conflict somewhere – definitely contact your host for help on this one and see what they say. Good luck!

    It’s multisite stripping the www.

    Go in the db, look for any fields without it, and add them.

    Andrea_r thanks for your reply, can you give me some pointers on where to look in the db? thanks

    I got a reply from my host regarding this issue and they said they don’t support WordPress, not help here.

    Next, I looked around my db using phpMyAdmin and found 3 tables where the domain name was listed without www’s: wp_blogs, wp_site, and wp_sitemeta.

    I added the www’s in all 3 of them, then the page wouldn’t load again and gave me a “Error 310” as described before. When reverting these changes I noticed that the changes in wp_site and wp_sitemeta didn’t really do anything and the change in wp_blogs was causing the error, So I’m thinking there must be some other places where I need to make changes, but I don’t know where they are….can anyone help?

    Thanks, ssaral

    look in wp-config.php and .htaccess.

    OK I made the changes in wp-config.php it had no effect and there are no redirects or any other mentions of the domain name in the .htaccess file. Any other suggestions?

    Thanks, ssaral

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Need www back in domain name’ is closed to new replies.