Domain mapping changed with WordPress 3.9

Since I upgraded to Wordrpess 3.9 I have noticed that the domain now ends up on the site not found page.

It used to point to

Any suggestions?

  • Vaughan
    • Support/SLS MockingJay

    Hi @tim Neale,

    I have just tested this on my multisite using latest domain mapping and wp 3.9, it worked fine.

    Can you check that sunrise.php exists still in your /wp-content folder? If not can you copy the sunrise.php from wp-content/plugins/domain-mapping to your /wp-content folder.

    Hope this helps

  • Tim Neale
    • Site Builder, Child of Zeus

    Yes sunrise.php still exists it is the same version as in the plugin directory.

    The www. function still maps to a mapped domain such as

    But it fails on the root site goes to

    and is ok

    I have several multi-site set up with 2 different hosting companies, the problem is on all 4 of them. WWW. on the root site goes to site not found.

  • Jack Kitterhing
    • Code Norris

    Hi there @tim Neale,

    Hope you’re well today and thanks for the additional information.

    Can you paste your .htaccess here please?

    Could you also try adding this to your wp-config.php above the line reading that’s all stop editing happy blogging!

    define( 'NOBLOGREDIRECT', '' );


    Kind Regards


  • Tim Neale
    • Site Builder, Child of Zeus

    Hi Jack,


    <files wp-config.php>

    order allow,deny

    deny from all


    RewriteEngine On

    RewriteCond %{HTTP_HOST} ^$ [OR]

    RewriteCond %{HTTP_HOST} ^$

    RewriteRule ^/?$ “” [R=301,L]

    RewriteCond %{HTTP_HOST} ^$ [OR]

    RewriteCond %{HTTP_HOST} ^$

    RewriteRule ^/?$ “” [R=301,L]

    RewriteCond %{HTTP_HOST} ^$ [OR]

    RewriteCond %{HTTP_HOST} ^$

    RewriteRule ^/?$ “” [R=301,L]

    RewriteCond %{HTTP_HOST} ^$ [OR]

    RewriteCond %{HTTP_HOST} ^$

    RewriteRule ^/?$ “” [R=301,L]

    RewriteBase /

    RewriteRule ^index.php$ – [L]

    # add a trailing slash to /wp-admin

    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]

    RewriteCond %{REQUEST_FILENAME} -d

    RewriteRule ^ – [L]

    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]

    RewriteRule ^(.*.php)$ $1 [L]

    RewriteRule . index.php [L]

    <Files 403.shtml>

    order allow,deny

    allow from all


    deny from

    #Silence is Golden Guard plugin

    Options -Indexes

    I already have the following in the

    define(‘NOBLOGREDIRECT’, ‘’:wink:;

    This is as required.

    The issue is that previously there was no redirect on but now there is

  • Sam
    • The Incredible Code Injector

    Hi @tim

    I deactivated Domain Mapping plugin for some seconds and the www link redirected to not found page.

    Please rename sunrise.php ( which is located in wp-content directory) to something else and deactivate Domain Mapping and see if you still see www url redirecting to not found page.

    Please keep me posted.


  • Tim Neale
    • Site Builder, Child of Zeus

    I renamed sunrise.php to NOsunrise___.php

    I deactivated the plugin

    I cleared my browser history and ipconfig /flushdns

    The domain mapping is still working for the mapped domains such as But But the wordpress site has links of the format

    www url for the root site is redirecting to not found page.

  • Sam
    • The Incredible Code Injector

    Please visit

    On the contact form, select “I have a different question“, this ensures it comes through and gets assigned to me.

    – Mark to my attention – ATTN: Sam Najian

    – Link back to this thread

    – Include admin/network access

    – Include cPanel (I will need to look at the DB so need PHPMyAdmin or similar)

    – Include FTP

    – Include any relevant URLS for your site

  • Sam
    • The Incredible Code Injector

    @tim Neale

    For domain mapping to fully deactivate first it should be deactivated then the sunrise.php file should be renamed, i did that to deactivate the Domain Mapping plugin, even with that deactivated www was getting a not found response.

    1) The problem can’t be from domain mapping plugin

    2) There was the following in you wp-config.php file:

    define(‘NOBLOGREDIRECT’, ‘’:wink:;

    which would redirect www to site-not-found page, i commented that and now your www redirects to the correct domain without www

  • Tim Neale
    • Site Builder, Child of Zeus


    I was and am aware of the NOBLOGREDIRECT to site-not-found’. It has been there for some time. Because I wanted this to happen. (see above).

    The problem is that previously even with this line in the wp-config.php the URL with the www was being mapped to the correct domain. I.e It was not being redirected. Now is being redirected because it is being counted as ‘blog not found’.

    This represents a degradation of functionality.

    I now have a choice between having no redirect for un-found blogs OR having the root www being redirected to the site not found page.

    Again this was not happening previously.

    I think I shall trying redirecting the www. in the .htaccess file. to work around this.

  • Tim Neale
    • Site Builder, Child of Zeus

    HI Sam,

    I used this which appears to work fine.

    RewriteCond %{HTTP_HOST} ^$

    RewriteRule ^/?$ “” [R=301,L]

    I have looked at two different servers with two different companies. Both show NOBLOGREDIRECT on So something must have changed somewhere.

    It might be an enhancement for a future version domain mapping to handle this.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.