• I have domain mapped dozens of other domains to individual pages and they seem to work fine. But one of the domains redirects to the main homepage domain. The weird thing is with this one mapped domain is that child pages and files of that domain work correctly, mappeddomain.com/page will correctly show maindomain.com/mappeddomain/page or mappedomain.com/license.txt works fine. But mappeddomain.com itself redirects to maindomain.com

    I’d be happy to email you the domains to look at, or even the login details to login and have a look as I trust Falke Media and can change the password after.

    I’ve had this problem before and I couldn’t solve it, I kinda hopped an update to this plugin would just make it work. But that might not have been the best approach.

    • This topic was modified 2 years, 9 months ago by munchmonster.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author matthias.wagner

    (@matthiaswagner)

    hy ??
    usually these issues come from cached pages or redirects. but since you are experienced with the plugin, i guess you have disabled and flushed your browsers cache or tried a fresh browser already?

    Thread Starter munchmonster

    (@munchmonster)

    Yes I don’t even have cache enabled for this site and all testing has been done with browser cache refreshed each time. It occurs in any browser, in private mode, and on other devices.

    I can’t really imagine what is causing it for just this one mapped domain, when all the other mapped domains I have done are working fine.

    Plugin Author matthias.wagner

    (@matthiaswagner)

    hy.
    you can try solution 2 from this source: https://maheshwaghmare.com/avoid-wordpress-canonical-redirection/

    although we have already taken care of the canonical redirect in our plugin, this could have something to do with it…

    Thread Starter munchmonster

    (@munchmonster)

    Putting that solution in my functions.php doesn’t seem to change anything.

    The issue seems to be with the domain itself rather than the page, because if I map a different domain to the page the page loads fine. But there’s nothing special about the domain at all, it just points to my server like the rest of them with an A Record to the server IP.

    Plugin Author matthias.wagner

    (@matthiaswagner)

    hy,
    i found this plugin with a quick search (not tested yet): https://www.ads-software.com/plugins/debug-wp-redirect/

    it could give you some information where and why this redirect happens

    Thread Starter munchmonster

    (@munchmonster)

    Ah that plugin looks interesting. I tried it out and got this:

    Debug WP Redirect
    Location
    https://themain.com/
    Status
    301
    User Logged In
    No
    Backtrace
    ?	Level 1
    o	File: /home/appuser/webapps/website/wp-includes/canonical.php
    o	Line: #799
    o	Function: wp_redirect
    o	Function Arguments:
    o	array(2) {
    o	  [0]=>
    o	  string(28) "https://themain.com/"
    o	  [1]=>
    o	  int(301)
    o	}
    ?	Level 2
    o	File: /home/appuser/webapps/website/wp-includes/class-wp-hook.php
    o	Line: #307
    o	Function: redirect_canonical
    o	Function Arguments:
    o	array(1) {
    o	  [0]=>
    o	  string(28) "https://mapped.com/"
    o	}
    ?	Level 3
    o	File: /home/appuser/webapps/website/wp-includes/class-wp-hook.php
    o	Line: #331
    o	Class: WP_Hook
    o	Object: WP_Hook
    o	Type: ->
    o	Function: apply_filters
    o	Function Arguments:
    o	array(2) {
    o	  [0]=>
    o	  NULL
    o	  [1]=>
    o	  array(1) {
    o	    [0]=>
    o	    string(0) ""
    o	  }
    o	}
    ?	Level 4
    o	File: /home/appuser/webapps/website/wp-includes/plugin.php
    o	Line: #474
    o	Class: WP_Hook
    o	Object: WP_Hook
    o	Type: ->
    o	Function: do_action
    o	Function Arguments:
    o	array(1) {
    o	  [0]=>
    o	  array(1) {
    o	    [0]=>
    o	    string(0) ""
    o	  }
    o	}
    ?	Level 5
    o	File: /home/appuser/webapps/website/wp-includes/template-loader.php
    o	Line: #13
    o	Function: do_action
    o	Function Arguments:
    o	array(1) {
    o	  [0]=>
    o	  string(17) "template_redirect"
    o	}
    ?	Level 6
    o	File: /home/appuser/webapps/website/wp-blog-header.php
    o	Line: #19
    o	Function: require_once
    o	Function Arguments:
    o	array(1) {
    o	  [0]=>
    o	  string(68) "/home/appuser/webapps/website/wp-includes/template-loader.php"
    o	}
    ?	Level 7
    o	File: /home/appuser/webapps/website/index.php
    o	Line: #17
    o	Function: require
    o	Function Arguments:
    o	array(1) {
    o	  [0]=>
    o	  string(55) "/home/appuser/webapps/website/wp-blog-header.php"
    }
    Plugin Author matthias.wagner

    (@matthiaswagner)

    hm. and does this output change if you apply solutions #1 / #2 from my previous link?
    from the stack i can see that indeed canonical redirect is happending …

    Thread Starter munchmonster

    (@munchmonster)

    When I add

    add_filter( 'redirect_canonical', '__return_false' );

    to my functions.php then the debug doesn’t come up at all, it just redirects mapped.com to themain.com as if the debug plugin wasn’t even activated. When I remove that code from functions.php the debug appears again when you try to visit mapped.com.

    Plugin Author matthias.wagner

    (@matthiaswagner)

    thats interesting… unfortunately we cant offer on-page-support for more detailed review. but i guess you’ll be able to find php devs / freelancer who can continue diving into the redirects and filters.

    i’m sorry that i cant offer a better answer for you.

    Thread Starter munchmonster

    (@munchmonster)

    I have found a workaround. Disabling this plugin and enabling Domain Mapping System (https://www.ads-software.com/plugins/domain-mapping-system/) does fix the issue, though it’s not an ideal solution because with Domain Mapping System things like subpage mapping seem to be a premium feature (https://domainmappingsystem.com/#pricing) whereas with your plugin it’s included for free. Also with DMS the page titles don’t appear correctly, it just shows the main site tagline.

    Thread Starter munchmonster

    (@munchmonster)

    With some more investigation it looks like you can use Domain Mapping System and Multiple Domain Mapping on Single Site at the same time. So you can use just DMS for affected domains while still using this plugin for domains that still work. You can even leave the domain mapping for the affected domain in both plugins and it looks like DMS overrides this plugin for that domain.

    However, DMS still has the problems I mentioned earlier. DMS also doesn’t work with setting a custom favicon for the specific page by adding the following code to the specific page’s header: https://www.ads-software.com/support/topic/a-way-to-have-custom-site-icon-for-any-pages-including-mapped-pages/

    I also wonder if Domain Mapping System restarted their development after many years of no updates in response to the popularity of this plugin.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘One of the domain’s I mapped 301 redirects to main homepage domain’ is closed to new replies.