• The official WordPress Codex states: “In WordPress 4.5+, domain mapping is a native feature.”

    Unfortunately, this plugin is no longer maintained, even though it is still the best, safest and easiest way to ensure perfect redirection to to correct (sub) blog.

    The mentioned define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']); often results in wrong redirections to the main blog:
    In WordPress Network Admin: http://www.mydomain.org/ will likely make typing mydomain.org redirect to the main blog: https://example.com/?signup=new

    At the time of writing this review I am still very happily using WordPress MU Domain Mapping on WordPress MultiSite 5.7.1-alpha-50553, PHP 8.0.2. to ensure that my visitors end up on the correct blog (http, https, with and without www).

    In wp-config.php:

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    
    /* Prevent redirection to /?signup=new */
    define('NOBLOGREDIRECT', 'https://www.main-domain.com');
    define('SUNRISE', 'on');

    The defined COOKIE_DOMAIN will be set by this plugin to the correct url of all your blogs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I also agree, this is still the most reliable solution. In fact, after hours of messing around with trying to get multisite domain resolution to work properly, this plug-in is the only thing that solved the issues I was experiencing.

    I also agree that just using the define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']); was not sufficient. At least not in my setup, which is on Nginx. Putting in the non-www domains into browser would always redirect to the `?signup=new’ page on the primary network domain, even after I tried numerous approaches to configuration in Nginx.

    I am glad to hear my configuration (which was generated through WordOps) is not the only one that was having that occur.

    Gerinho

    (@ginhofresh)

    As someone seeking to solve the multisite + domain mapping + multilingual WordPress puzzle successfully, I thank you both @duisterdenhaag and @inspired888 greatly for these recent (2021!) reviews and explanations. I kind of hit the same walls past days & nights when messing around to get the setup and config all right. Your comments helped me a lot and pushed me in the right direction!

    @duisterdenhaag (fellow dutchie? ;)) also thank you for your reviews at Multisite Language Switcher and MslsMenu, these helped me a lot as well!

    • This reply was modified 3 years ago by Gerinho.
    inspired888

    (@inspired888)

    @ginhofresh — You’re welcome. Thanks for sharing. Good luck with your new Multisite installation.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Still the best solution!’ is closed to new replies.