Domain Mapping Plugin - How can I map subdomains (

Hey Guys,

I like the domain mapping plugin, but it is presenting a problem for me - I want to be able to map to one of my wpmu sites (ex: to

the plugin instructions say to create an A record and for the TLD then a CNAME for the subdomain. Results in this pattern:
go to, I get redirected due to the CNAME and when I land on my wpmu site, I end up on

I want to end up on

Can the plugin support this? or is there a config option I'm missing.

  • wpcdn
    • Syntax Hero


    I think you're thinking there are a few more steps than there are. You wouldn't want to create an A and a CNAME. The instructions might not make it totally clear, but you want one or the other. To summarize:

    If your domain to be mapped is a subdomain (, then you create a CNAME pointing it to the URL or hostname of your blog on the multisite setup.

    But, if your domain to be mapped is a top-level domain (, then you create an A record pointing it to the IP address listed in the domain mapping instructions. Then you add it in your multisite blog so WordPress knows what to do with incoming traffic to that domain.

    So you need to create an A record pointing to the A record of your multisite installation. Then, in the Domain Mapping settings in the Dashboard of, you add

    Hope this helps.


  • LexBlog
    • Design Lord, Child of Thor


    I appreciate the insight, but I think my explanation was just too verbose.

    Went back through my settings and validated my issue.

    The domain mapping plugin wont allow me to keep 'www' in front of a domain. It changes the url from '' to ''.

    When I visit '' it gets redirected to ''

    When I try to add '' as a mapped domain, the plugin automatically strips anything before ''.

    This might cause me to go back to a different plugin.

  • wpcdn
    • Syntax Hero

    I see. There is a growing movement not to use the www any more (although some oppose this movement). WordPress multisite also doesn't use the www by default.

    One option is to map the domain without www, then at your source redirect the www version to the non-www version (which is then mapped to your WordPress installation).

    The plugin is actually doing the right thing, because it is designed to facilitate mapping a top-level domain (e.g., Whereas is actually a subdomain. You might do a CNAME of to the blog URL, but the problem is that some systems like cPanel don't do well when you CNAME anything related to the top-level domain.


  • Philip John
    • DEV MAN’s Apprentice

    Hiya Tim, Mark,

    The issue you have here Tim is that WP Multisite itself doesn't really support WWW.

    When you use WWW it's going to be looking for a sub-site called www rather than pointing to your main site as you are probably expecting.

    It's possible to achieve WWW I believe (though I wouldn't recommend it!) Here's how...

    1. Add your site in MS, then map the domain without WWW.
    2. Using mod_rewrite, add a rule to your htaccess for that domain that rewrites the non-www versions of the URLs to WWW versions.

    That *should* work but I'm not making any promises.

    Unfortunately I can't find any examples of exactly how to do this - they all just show how to redirect, rather than rewrite non-www to www.


  • LexBlog
    • Design Lord, Child of Thor

    Hi Phil,

    I actually solved this over the weekend by doing a little plugin hacking and editing the plugin:

    $domain = $this->db->escape( preg_replace( "/^www\./", "", $_POST[ 'domain' ] ) );

    any preg_replace reference to www I removed, and now the plugin works exactly as I expect.

    I realize this isn't a supported config, so I wont be asking for help - but this would be a GREAT update to the next feature of the plugin.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.