Your Mapping plugin is causing toom many redirects and page load issues

I have just determined with 100% certainty that your domain mapping plugin has an issue with the latest version of wordpress. I couldn't get pages to load, so I deactivated all network plugins. I had a hunch, mapping was the plugin. When it was activated the issue reoccurred. I have granted support access so you can see the issue 1st hand.

My issue is that I have clients who need their domains working properly. Right now they are all resolving on subdomains.

  • Kasia Swiderska

    Hello Thomas,

    Could you leave in support message where I can observe those redirects and pages not loading? For testing purpose I enabled domain mapping and checked sites with mapped domains and their admin dashboard and everything looks fine on my side.
    I also tested Domain Mapping on my Multisite and I cannot replicate that type of issue.

    Only thing I noticed that your Multisite domain ssl certificate is not wildcard certificate so there is alert when opening subsites dashboard. But other than that I haven't seen anything wrong there.

    But it is possible that I'm not checking this in the right way - if you can provide exact steps I can replicate issue on your site it would be great.

    For now I will disable Domain Mapping in case it is still causing those issues.

    kind regards,
    Kasia

  • Thomas

    I just tested it again and it is not working. When the mapping plugin is active, no inner pages of hattiesburgpatriot.com load. So of you go to the main page and click on a title of an article, it "redirected too many times."

    All of my subsides work properly. Activating this plugin only seems to affect the main, non mapped, primary domain.

    This issue is becoming a nightmare for me.

  • Thomas

    Also, I installed the plugin Wordpress MU Domain mapping to see if it would work instead of your plugin and got this.

    Please edit your /home/hpatriot/public_html/hattiesburgpatriot.com/wp-config.php and move the line define( 'SUNRISE', 'on' ); above the last require_once() in that file or make sure you updated sunrise.php.

    Sunrise.php reads as follows

    <?php

    $sunrises = array(

    "dm_sunrise" => defined("DM_CUSTOM_SUNRISE") ? DM_CUSTOM_SUNRISE : ( defined( "WP_PLUGIN_DIR" ) ? rtrim( WP_PLUGIN_DIR, '/\\' ) . "/domain-mapping/inc/sunrise.php" : dirname( __FILE__ ) . "/plugins/domain-mapping/inc/sunrise.php" ),

    "md_sunrise" => defined("MD_CUSTOM_SUNRISE") ? MD_CUSTOM_SUNRISE : ( defined( "WP_PLUGIN_DIR" ) ? rtrim( WP_PLUGIN_DIR, '/\\' ) . "/multi-domains/inc/sunrise.php" : dirname( __FILE__ ) . "/plugins/multi-domains/inc/sunrise.php" )

    );

    foreach( $sunrises as $sunrise ){

    if( is_readable( $sunrise ) ){

    include $sunrise;

    }

    }

    Also the wpconfig file reads as follows.
    <?php

    /** Enable W3 Total Cache */

    define('WP_CACHE', true); // Added by W3 Total Cache

    /**
    * The base configurations of the WordPress.
    *
    * This file has the following configurations: MySQL settings, Table Prefix,
    * Secret Keys, WordPress Language, and ABSPATH. You can find more information
    * by visiting {obito http://codex.wordpress.org/Editing_wp-config.php Editing
    * wp-config.php} Codex page. You can get the MySQL settings from your web host.
    *
    * This file is used by the wp-config.php creation script during the
    * installation. You don't have to use the web site, you can just copy this file
    * to "wp-config.php" and fill in the values.
    *
    * @package WordPress
    */

    //Added by WP-Cache Manager
    //define( 'WPCACHEHOME', '/home/hpatriot/public_html/hattiesburgpatriot.com/wp-content/plugins/wp-super-cache/' ); //Added by WP-Cache Manager
    define('WP_MEMORY_LIMIT', '256M');

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    //Added by WP-Cache Manager
    define('DB_NAME', 'hpatriot_hat1206810001053');

    /** MySQL database username */
    define('DB_USER', 'EDITED OUT');

    /** MySQL database password */
    define('DB_PASSWORD', 'EDITED OUT');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');

    /**#@+
    * Authentication Unique Keys and Salts.
    *
    * Change these to different unique phrases!
    * You can generate these using the {obito https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
    * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
    *
    * @since 2.6.0
    */
    define('AUTH_KEY', 'B}:8qui3:b$||V>=bvx-e-IoeT;IbpADS]|_E=3)>y*r~JjDgyXW% )!cCq7(Pw{');
    define('SECURE_AUTH_KEY', EDITED OUT
    define('LOGGED_IN_KEY', 'EDITED OUT
    define('NONCE_KEY', '#|) hSsGEodjAUM;|h0rMzW(& I{s-lO#C=kB@BqwjVAHC(.7u:{KAfDOME3R5Hh');
    define('AUTH_SALT', 'v&})7UPCI@mu=!|Mug>&,va{z<D4/$#&|9r$j<eJ:lwkg1|o#Jt)pUp]KLZpC#}h');
    define('SECURE_AUTH_SALT', 'l_+gK9--GRWb+0vbns1}xn<|AgYJq9X*GYPjy!NsF|4H_0<:wink:>Qx8Z90(0+dQ.wQ_');
    define('LOGGED_IN_SALT', 'j59RpB|d2%6jeP6 +}:disappointed:Cy?/u3]U:6qeV`fk4RI+0dtlRm9#HfS=6g-^|heJqg?');
    define('NONCE_SALT', 'ZY+jq`|Vx|gD_DqL>l+bc~VTQCnNpcxz_r812M8.}JuUY|R*D*/B87@z|p$%hBUy');

    /**#@-*/

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = 'wp_';

    /**
    * WordPress Localized Language, defaults to English.
    *
    * Change this to localize WordPress. A corresponding MO file for the chosen
    * language must be installed to wp-content/languages. For example, install
    * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
    * language support.
    */
    define('WPLANG', '');

    /**
    * For developers: WordPress debugging mode.
    *
    * Change this to true to enable the display of notices during development.
    * It is strongly recommended that plugin and theme developers use WP_DEBUG
    * in their development environments.
    */
    define('WP_DEBUG', false);
    //define( 'WP_DEBUG_LOG', true );
    //define( 'WP_DEBUG_DISPLAY', false );

    /**define ( 'BP_ROOT_BLOG', 58 );*/
    /**define( 'BP_ENABLE_MULTIBLOG', true );**/
    /**define( 'PB_BACKUPBUDDY_MULTISITE_EXPERIMENT', true );**/

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'hattiesburgpatriot.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    if ( $_SERVER["HTTP_HOST"] == "hattiesburgpatriot.com" ) {
    define('FORCE_SSL_ADMIN', true);
    define('FORCE_SSL_LOGIN', true);
    }
    define('SUNRISE', 'on');

    /* That's all, stop editing! Happy blogging. */

    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

    /** Sets up WordPress vars and included files. */

    require_once(ABSPATH . 'wp-settings.php');

  • Adam Czajczyk

    Hello Thomas!

    I checked your site as I promised during the live chat today. Could we please go through this "step by step"? I may need some more information on your setup in addition to what I can see through your site's back-end and some external tools.

    The first issue: the redirect loop on the main site with Domain Mapping active is caused by the Domain Mapping setting that's forcing connections to go over "http://" protocol.

    The "Force http:// on front-end pages" option (I switched it off) in Domain Mapping network settings affects all the sites, including the main site. Your main site however is forced to use HTTPS secure connection (it's set to use "https://") so when a request goes to the site it redirects to the "https://" connection then DM (set to force "http://") redirects to the "http://" protocol, then WP tries to get back to "https://" etc. This is causing a redirect loop. Switching off the option solves this immediately.

    I understand that you did this to make sure that the sub-sites (that are not secured with SSL cert) would load properly over "http://" but I suggest we get back to it after we got a solution for remaining issues.

    These would be "broken" mapped domains. I do see the "Invalid" status for now even though A record in DNS is set to the proper IP and when you try to access the "mapped domain" while DM mapping is disabled, it loads the main site (redirecting to the signup page). I cannot however review the configuration of these domains so could you please provide me with some more information on this? What I'd like to know would be first and foremost:

    - is your IP a dedicated or shared IP (I can see there are several domains hosted with it but can't tell from outside if it's one way or another)?

    - if it's dedicated, are you able to set "root folder" for it? I see it's now pointing to the "default host page" so is this IP used only for the domains related to this particular multisite or some of the domains associated are used for completely separate WP installs (or other not-related sites)?

    - how are these mapped domains setup: are they added to your server as add-on/parked domains or is it just a DNS configuration pointing to the IP? What's an example (you can strip domain name or just replace it with something like "mapped.com") of DNS settings for any of the mapped domains?

    I'm asking this to better understand the setup that you are using. Please advise!

    Best regards,
    Adam

  • Thomas

    Thank you for this thorough analysis.

    - if it's dedicated, are you able to set "root folder" for it? I see it's now pointing to the "default host page" so is this IP used only for the domains related to this particular multisite or some of the domains associated are used for completely separate WP installs (or other not-related sites)?

    The IP address is dedicated. Currently it isn't associated to specific domain. It can be associated to a specific domain if needed. I have a multisite installation, but I also have 1 site that is running in it's own folder (not wordpress) and another site getting ready to be hosted in its own folder. If needed, I can move those sites to a shared hosting plan. They don't get that much traffic. The traffic is on the multisite network.

    - how are these mapped domains setup: are they added to your server as add-on/parked domains or is it just a DNS configuration pointing to the IP? What's an example (you can strip domain name or just replace it with something like "mapped.com") of DNS settings for any of the mapped domains?

    A subdomain site is added in wordpress, it is mapped to the primary site. Each primary domain points to the server ip address, as does the matching A record subdomain (primary site) to the wordpress site subdomain.

  • Thomas

    life.hattiesburgpatriot.com (MAPPED to Hattiesburg.life), politisippi.hattiesburgpatriot.com (MAPPED to Politisippi.com, and

    c*(&^%(redacted).hattiesburgpatriot.com mapped to a storage facility are gettign Database connection errors. <----This site is now deactivated in wordpress network admin until I can resolive this.

    here is what i get when I try to go to Politisippi.com now.

    You are logged in already. No need to register again!
    The site you were looking for, https://hattiesburglife.hattiesburgpatriot.com/, does not exist.

    There is no such site on my network with that URL. it is supposed to be life.hattiesburgpatriot.com mapped to Http://Hattiesburg.life

  • Adam Czajczyk

    Hello Thomas!

    Thank you for getting back to me with this.

    A subdomain site is added in wordpress, it is mapped to the primary site. Each primary domain points to the server ip address, as does the matching A record subdomain (primary site) to the wordpress site subdomain.

    I was asking rather for the DNS configuration - A and CNAME records and their values etc and also if the "mapped" domains are hosted entirely "outside" of your server (just pointing to it via DNS) or if they are added (like an "add-on" or "parked" domains) to your server.

    As for the Politisippi.com. This happens now with Domain Mapping enabled or disabled? When I was checking it (please note: I have made no change whatsoever to the site configuration except switching off the "Force http:// for front-pages" option in network Domain Mapping setup) it was redirecting to "hattiesburgpatriot.com/wp-signup.php" to new blog creation page in both casese - with and without Domain Mapping enabled.

    I assume you made no changes since I accessed your site? Or if you did, what where they?

    Best regards,
    Adam

  • Thomas

    I am restoring the database. Some plugin tables were cleaned out and caused an issue. No worries. When we get this restored, i will go into the domain mapping settings and adjust the settings. I really appreciate your help. Unfortunately this will take an hour. I am upgrading my storage with godadyd to accommodate the needed space for the temporary files.

    I am cheap, and have been avoiding a wildcard ssl for these subdomains. Would this help? please advise.

    To answer your question, all domains reside on my account with GoDaddy. None are "parked."
    All point to the single server ip address.

  • Thomas

    Adam,

    Thank you for taking the time to look into this. I really appreciate it. I have restored the entire server from a backup which occurred at 5am yesterday. Everything seems to be operating as it should. However, something ooccurred since that backup, but before the restore to throw it into a tail spin.

    Would you please log in and look at the mapping setting and the site, just to see if you notice anything peculiar? I really do appreciate your help. I have enables support access.

    All mapped domains are resolving just fine now. I'm curious what you notice in domain mapping.

  • Dimitris

    Hey there Thomas,

    hope you're doing good and don't mind chiming in!

    I just went ahead and accessed your multisite installation and I can see that everything is up and running, I'm so glad you sorted all these out! :slight_smile:
    I haven't seen anything "peculiar" too, the "force http/https" thing was perfectly described by my colleague Adam in a previous reply.
    Also, gettings a wildcard certificate isn't necessary right now, but it seems that in future it will be a bit more "obligatory" from services and browsers. It still is more of a personal and business decision though.

    Warm regards,
    Dimitris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.