Domain Mapping not working

Hello,

Domain mapping is not working. I get an error saying redirected you too many times.

Can you please support.

Best Regards
Serkan

  • Rupok

    Hi Serkan,

    This is really weird and should not happen. Can you please confirm you followed all steps described in this usage guide: https://premium.wpmudev.org/project/domain-mapping/#product-usage and still getting this redirection issue?

    Can you also make sure your .htaccess file *only* has the following code? Nothing else?

    RewriteEngine On
    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]

    If not, can you please copy your current .htaccess file code to any file and save that in your computer, then replace your current .htaccess file with the code above?

    Not sure if SSL has anything to do with this in this case, but can you please tell us how you configured SSL for your multisite network?

    Please let us know these details. I'm looking forward to hearing from you and resolving this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Nithin

    Hi Serkan,

    Hope you are doing good today. :slight_smile:

    Regarding SSL installation, I didn't do anything specific, just a regular SSL installation.

    By regular installation, did you meant Wild Card SSL, right?

    To have a better idea regrading this issue, could you please enable support access, so that we could give a closer look. You can grant access from WPMU DEV > Support > Support Access > Grant Access, or check this manual: http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please let us know once you enable access, so that we could get this sorted. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Rupok

    Hi Serkan,

    Thanks for granting Support Access. I logged in your site to investigate the issue but I found that Domain Mapping is already deactivated. Is it okay if we activate that plugin to do the testing? And can you please confirm which domain you are trying to map and to which subdomain? I'll try to map that domain to that subsite and will troubleshoot any issue I find while mapping.

    Please provide as much details as you can. I'll jump in as soon as you confirm and will try to resolve this issue for good.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Serkan,

    Thanks for granting Support Access. I checked your configuration and found that you have mapped a non SSL domain to your SSL subsite and that's why the redirection was happening. I changed the schema of mapping and now your mapping is working perfectly. Please go to https://serkankaya.com and you get your site loading fine.

    I've also created a test user and assigned that user to that subsite. Then I tried to login with that test user login credentials and I could login fine without any issue. So this issue is resolved also.

    Can you please check and confirm?

    Please let us know if you have any further query. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Serkan,

    To fix that, please go to that subsite "Dashboard > Tools > Domain Mapping" section and select "Directed to mapped (primary) domain" for "Front end redirect should be:" option and save. Please check the attached screenshot for reference.

    I believe, this will resolve this issue.

    Please let us know if you have any further query. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

  • Nithin

    Hi Serkan,

    Hope you are doing good today. :slight_smile:

    So sorry for the delay in getting back to this thread, I could see that the login page style doesn't load. It seems like the support access got expired, to have a better understanding of this issue, could you please enable support access, so that we could give a closer look. You can grant access from WPMU DEV > Support > Support Access > Grant Access, or check this manual: http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please let us know once you enable access, so that we could get this sorted. Have a nice weekend. :slight_smile:

    Kind Regards,
    Nithin

  • Kasia Swiderska

    Hello Serkan,

    I changed option in "Force http/https (Only for original domain)" to yes in Domain Mapping settings because you are using crossdomain login and without that option script that handles that was loading with http - and as mixed content was blocked by browsers.
    Now login page for that subsite is loading correctly on my side - please check and confirm that is also working on your side.

    kind regards,
    Kasia

  • Rupok

    Hi Serkan,

    I checked the login page you provided and it seems like the login form input action is still set to a NON-SSL URL (http://onur.personal.website/wp-login.php) and that's why the issue is happening.

    To fix that, can you please add the following line in your "wp-config.php" file and save and check if the issue is gone?
    define( 'FORCE_SSL_LOGIN', true );
    To do this, please login to your server with any FTP application like Filezilla and go to the root folder of your network. There you will get the "wp-config.php" file. Open that and edit as I suggested above.

    I believe this will resolve your issue. If it doesn't, please let us know. We will be glad to investigate further.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Serkan,

    So sorry to hear this. Let me describe one by one.

    the sites I have recently created redirect the URLs to the subsite links not the mapped domains even though I set the right settings

    Did you create your menus after mapping the domain or before mapping the domain? I went to ipvpn.net Dashboard and checked your "main" menu. It seems like you are using Custom Links in your menus. And Domain Mapping plugin doesn't change custom links. The reason is, custom links are generally used for external links. For example, if you want to link to google.com, then you will be using custom links and Domain Mapping should not touch that according to your mapping settings. If you want to link your "about" page or any other pages, or posts or category archives, then WordPress has native way to add your pages to menus. I've changed your custom links to page links in your "Dashboard > Appearance > Menu" section. Now your links are showing your mapped domain links.

    I should also add that, even though previously your links were showing un-mapped subsite URL, when you go to that link, it will automatically redirect you to proper mapped domain page. You can try going to "https://ipvpn.personal.website/about" this link and see what happens.

    Regarding the login issue, instead of going to "wp-login.php" page, I went to "https://onur.personal.website/wp-admin/" and it threw me lots of errors from your "Content Monitor" plugin. So can you please try deactivating this plugin and check if the issue is still there?

    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: mb_stripos(): Empty delimiter in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php on line 103
    
    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php:103) in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/Helper/Session.php on line 29
    
    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php:103) in /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/Helper/Session.php on line 29
    
    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/personalwebsite/public/wp-content/plugins/content-monitor/content-monitor.php:103) in /srv/users/serverpilot/apps/personalwebsite/public/wp-includes/pluggable.php on line 1179

    In case it doesn't resolve the issue, I went ahead and did further investigation and found that your main site is still using HTTP link. Please check the attached screenshot for reference.

    So can you please check the following guide and change your site URL from HTTP to HTTPS and check if the issue is fixed?
    https://wpengine.com/support/how-to-change-a-multi-site-primary-domain/

    If even this doesn't resolve your issue, can you please send me message with cPanel access credentials through our secure contact form here: https://premium.wpmudev.org/contact/ so we can investigate further and try to fix this for you?

    Subject: "Attn: Rupok"
    - cPanel Username
    - cPanel Password
    - cPanel Login URL
    - Link back to this thread for reference
    - Any other relevant URLs

    Select "I have a different question" for your topic. This and the subject line ensure that it gets assigned to me.

    I'm looking forward to hearing from you and resolving this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Serkan,

    Before trying all the things I suggested above, can you please again try adding the following line in your "wp-config.php" file and check?
    define( 'FORCE_SSL_ADMIN', true );
    If this doesn't resolve your issue, please proceed with the troubleshooting steps I suggested above.

    Please let us know how these go. I'm looking forward to hearing from you and resolving this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Serkan,

    Well, I can see that now. When you are logged in, your original domain is automatically redirected to the mapped domain. But when you are logged out, then the original domain doesn't redirect which is really weird. I'm pinging our developer regarding this and I believe, he will be able to find out why this is behaving such weird on your site. Can you please send me message with your FTP access credentials through our secure contact form here: https://premium.wpmudev.org/contact/ so I can forward these to our developer

    Subject: "Attn: Rupok"
    - FTP Username
    - FTP Password
    - FTP Host
    - Link back to this thread for reference
    - Any other relevant URLs

    Select "I have a different question" for your topic. This and the subject line ensure that it gets assigned to me.

    Please keep in mind, our developers work round the clock and they have to deal with lots of critical issues and other things. So it may take a little while for them to check this and provide a feedback.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Serkan,

    Thanks for sending FTP credentials. I tried to login but it doesn't show any files of your site. It shows me the following:

    So I think there is permission related issue for the user of your SFTP account you provided us. Can you please send us working credentials so we can check your files and try to resolve this faster?

    I'm looking forward to hearing from you and resolving this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Serkan,

    Thanks a lot for sending working credentials. They are working now, I've checked. I'm forwarding those our developer right now. I believe, he will come up with his valuable feedback soon.

    Please keep in mind, our developers work round the clock and they have to deal with lots of critical issues and other things. So it may take a little while for them to check this and provide a feedback.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.