Domain mapping with 'www'

Hi all!

I have released many single Wordpress sites for the company I work for this year. All this sites are ranking good in Google. We chose to let every domain begin with 'www'.

We are migrating all these sites to Wordpress MU now, because - as you know - it's far more efficient to have just one Wordpress installation and plugin database for every site. And Wordpress MU works superb. However, we've experienced one problem with the mapping of all domains to the Wordpress blogs.

We use the MU-plugin 'Domain mapping', to make sure that the domain name '' points to the right part of Wordpress MU. However, this plugin strips 'www' from the domain name. This is something that is documented in the plugin also: "www" does not count because it will be removed from the domain name.

For SEO purposes, we don't want to strip the 'www' part of the domain name; we want to keep it! What can we do to make it so?

Thanks in advance!


  • blixemtravel
    • New Recruit

    First of all: every current site we have is indexed with 'www' in front of the domain. But the most important reason is that we have put a lot of energy in linkbuilding. SO a lot of sites have placed backlinks to us, with 'www'. All those links are redirected with a 301 to the version of our site without 'www'. And we believe that every redirection is a disadvantage.

    So that's why we're eager to use '' as a default.

  • blixemtravel
    • New Recruit

    I tried method 1 of your guide, but sadly it was not sufficient. When I add 'www' to the domain in the plugin 'domain mapping' and change a few lines in the plugin (stuff like "preg_replace "www", "":wink:, the plugin isn't able to match the domain name to the right part of Wordpress MU.

  • Barry
    • DEV MAN’s Mascot

    I tend to follow the BBC way of things and strip the www from everything.

    @blixemtravel if you are 301 redirecting then you at no disadvantage at all. You can easily set up a Google webmaster tools account and tell Google that you want to use a specific format for your entries in the search index. I am pretty sure that Google is smart enough to understand that the www and the no www of the same domain are the same site. All the 301 tells Google is that you want the non-www to be indexed instead of the www version.

    WordPress MU does a lot of www stripping for it's own purposes. Trying to force it to do something that it isn't meant to do and has zero benefit or upside doesn't really seem worthwhile.

    But that's only my opinion.

  • drmike
    • DEV MAN’s Mascot

    It's been attempted a number of times previously but seems like every time someone gets it working, someone else finds where their fix fails.

    I know I tried it once and it was trying to include the www with the emails. Much like this:

    Considering that this is one of Matt's "It's this way and everybody else agrees with me" points, it's an uphill battle.

    Gotta admit that I'm tempted to suggest a simple force rewrite with htaccess. Let wordpress serve the pages without the www and tell the webserver to add it on there.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.