Domain Mapping links redirecting to original domain

After the update, links on homepage redirect to an original subdomain, instead of a mapped domain. The plugin's settings are set to "mapped domain" for Login and Administrator mapping

  • Dimitris
    • Support Star

    Hello there Innovate Srl,

    hope you're doing good today! :slight_smile:

    This should be happening due to some hardcoded URLs in the theme options of homepage.
    Please try to edit homepage from here
    http://*********.************.net/wp-admin/post.php?post=1245&action=edit
    and use the mapped domain URL in the slide button links as shown here
    https://monosnap.com/file/JAruH6rqZgiYYcxWN6HYaR7nPoLdK7

    Then clear all caches involving to this installation (from plugins, any server-side caching like memcached or varnish, browser cache) and check again the links in homepage.

    Warm regards,
    Dimitris

  • Innovate Srl
    • Design Lord, Child of Thor

    Hello, if I have understood well I should rewrite the links on the site pointing them to the mapped domain, this I can't do because we manage more than 80 sites. The problem occurred after the update. First all links even those without the mapped domain were redirected under the mapped domain. Example of a link: http://miosito.fluxbit.net/pagina was automatically redirected to http://miosito.it/pagina now this functionality is not present. The domain is always mapped as Directed to mapped (primary) domain.

  • Innovate Srl
    • Design Lord, Child of Thor

    New for me?

    We have 80 customer sites that now link internal links to a development subdomain (fluxbit) ... and it's a situation that starts to create problems for our customers.

    Furthermore, by pointing and opening links in the subdomain, we also have problems accepting cookies, finding a different domain from the one mapped.

    Until recently everything was working correctly, we would like to know if it's a problem with your plugin or anything else.

    Should your "Front end redirect should be: -> directed to mapped primary domain" function not solve this need?

    Waiting for your kind (and hopefully quick) feedback,
    Thanks in advance

  • Dimitris
    • Support Star

    Hello there Innovate Srl,

    hope you're doing good today! :slight_smile:

    I've investigated this a bit more and noticed that the links to original domain are actually accessible, meaning that there are not redirect to mapped domain when visited, as should have. I've also tested that in a test site of mine to confirm this and noticed that in the site settings of the mapped domain, siteurl value is the original subsite domain and home is the mapped domain, something that doesn't happen in your setup.
    Please try to edit the home value here
    http://www.*********.net/wp-admin/network/site-settings.php?id=86
    and let us know how that goes.

    Warm regards,
    Dimitris

  • Nastia
    • Support Rock Star

    Hello Innovate Srl

    Hope you're doing well!

    I've flagged our second level support developers in this thread so they could have a closer look at the issue.

    Please note, our developers' response time is longer-than-normal compared to support staff response times.

    Thank you for your patience!

    KInd regards,
    Nastia

  • Nastia
    • Support Rock Star

    Hello Innovate Srl

    I trust you're doing well!

    I've checked and our second level developers are troubleshooting the issue on your site. I am afraid I can't provide an ETA when the developers will follow up, it depends on how complex the issue is.

    We appreciate your patience in here!

    Kind regards,
    Nastia

  • Ivan
    • Developer

    Hi Innovate Srl !

    It seems grant access to your site was expired.
    If you provide me with additional login credentials, I can look into it more.
    Note: you gave credentials of a user that not network admin just site admin. Please, create a Superadmin user for us. Also, you gave FTP credentials without write permission - we need it for investigating this issue. Please, create a new FTP account with write permission or change permission for previous one.

    https://premium.wpmudev.org/contact/#i-have-a-different-question
    Please visit our private Contact page and complete the form with the following information:

    Subject: "Attn: Ivan Svyrskyi"

    In the Message box, please provide the following:

    link back to this thread for reference
    any other relevant urls

    Admin login:
    Admin username
    Admin password
    Login url

    FTP/SFTP credentials
    host
    username
    password
    (and port if required)

    Note: Don't send any credentials via this forum because it's public forum.

    Best,
    Ivan.

  • Ivan
    • Developer

    Hi Innovate Srl !

    It happened because we have a bug in the plugin for cases when your main site start with www., sorry. I fixed it on your site. If you have the same issue on another Multisite installation - you can make the following changes. First of all, open {wordpress_folder}/wp-content/plugins/domain-mapping/classes/Domainmap/Utils.php file via FTP, find is_original_domain function and replace this line (approximately 325th line)
    || strpos($domain, "." . $this->get_original_domain())
    to htis one
    || strpos($domain, "." . str_replace("www.", "", $this->get_original_domain() ))
    Also, our developers already know about this issue and it will be fixed in the next version of the plugin.

    Best,
    Ivan.

  • Innovate Srl
    • Design Lord, Child of Thor

    Hello Ivan, thank you for the intervention, I was checking both the file and the site, unfortunately it seems to not work, I explain the dynamically generated links (example wordpress menu) is automatically updated with the right links to the mapped domain, but all the links pointing to the subdomain are not automatically converted to the domain so in the url is displayed the path of the page or resource with the subdomain.
    Another site you can check is valeriadepero. it in the home there are several links that point to the subdomain, the strange thing is that if you open 4-5 together a half of it is converted on the domain another half remains in the subdomain. Could it be a cache problem? I tried to delete it both on the multisite and from my browser but nothing.

  • Ivan
    • Developer

    Hi Innovate Srl !

    You are right, it's a cache problem. You can check it - if you add some GET attributes to the URL, it will open mapped domain. For instance, it doesn't redirect the {your_sub_domain}/medicina-tradizionale-cinese/ page but if you change the URL to {your_sub_domain}/medicina-tradizionale-cinese/?test=test - it does. So, you should check all kinds of cache on your site.

    Best,
    Ivan.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.