Support » Networking WordPress » Forcing www on main domain

  • I have a WordPress Multisite install set up at a generic control panel domain, for example, We’re then mapping full domains to the subdomains on to this without issue.

    I’ve already modified wp-config.php to force SSL for admin, but I’m having issues because, when in the admin panel, WordPress drops the “www,” which of course causes an SSL mismatch.

    I’m able to get wp-login.php to show up on both www and non-www, but no matter which one is used, it redirects to the URL without www.

    How can I force the www within

    I’ve tried several .htaccess modifications and they either didn’t do anything or didn’t work at all.

    I tried modifying the wp_options table in the database so that the “siteurl” field is, but that caused a redirect loop.

    Any other ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    When you created your site, before activating Multisite, you can change your site and home URLs to – If you do that, and leave it alone, it’ll keep the www.

    Otherwise, you have to treat it like ‘moving wordpress’

    If I may, I’ve had similar issues and you might want to also add the following code to your .htaccess file to force URLs to resolve with the WWW or without it. (the example below is with the WWW)

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

    For those individuals that link strings without the “www” in the URL, such as:, it will resolve the URL to “” cleanly.

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    That doesn’t help the back end though, tjohare :/ WP has it ‘hard coded’ in the DB in places, and just a .htaccess fix will cause an endless redirect.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Forcing www on main domain’ is closed to new replies.