• Resolved tmobilon

    (@tmobilon)


    Hi there!

    The plugin is not working properly in one of my sites.

    We are trying to use a subdomain for a custom post type. The page loads correctly, and all the wp-admin links works as well. But the canonical and sitemaps are still displaying the CPT path, instead of the subdomain.

    I have the following mapping in the plugin:

    sub.domain.net/wordpress -> domain.net/wordpress/cpt

    I’m using Yoast 14.9 and WordPress 5.5. I’ve tested the same setup with Yoast 13.8 and the same problem was happening.

    I already tried:

    – flushing the permalinks in many ways (deleting in wp_options, saving the permalinks, etc);
    – disabled/enabled Yoast sitemaps many times;
    – Updated Yoast from 13.8 to 14.9;
    – Disabled/enabled Multiple Domain Mapping
    – Saved the mapping settings a few times.

    None of that fixed the problem…

    Any ideas?

    ## One more info

    I have this exact same setup working normally in the root of this same domain.

    sub.domain.net -> domain.net/cpt

    Everything works fine – sitemaps and canonical, also.

    The only diference between these two setups, is that one is located in a directory, and the other is in the root domain.

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

    (@matthiaswagner)

    hy,
    thanks for reporting and for your donation ??
    could you please provide the urls of your setups and screenshot of the mappings?

    matt

    Thread Starter tmobilon

    (@tmobilon)

    Hi there,

    Sure, here is an example:

    https://bau.tecnoblog.net/meiobit/2015/raspberry-pi-zero-so-existe-por-sugestao-de-eric-schmidt-influencia-google-fazer-mais-com-menos/

    If i open the post editor and hit “update”, the canonical changes to the mapped subdomain. But doing so doesn’t change the domain in sitemaps.

    Also, the Yoast index was generated after the plugin activation, and after publishing the post. So it’s not a cache related issue.

    The mapping:

    bau.tecnoblog.net/meiobit -> tecnoblog.net/meiobit/arquivos

    Thread Starter tmobilon

    (@tmobilon)

    Hi Matthias,

    Just an update: i’ve managed to replace the wrong URLs using nginx sub_filter. It’s just a quick fix, not the final solution. It replaces the tecnoblog.net/meiobit/arquivos/ path with bau.tecnoblog.net/meiobit/, everytime a html/xml file is generated.

    Not great, but works for now!

    Hope we can find aa definitive fix in the plugin. ??

    Plugin Author matthias.wagner

    (@matthiaswagner)

    hy ?? thanks for your donation and the advanced information. sounds like a good solution for the meantime.

    do you have a chance to set up a clean new environment where you can reproduce the behaviour? this sounds pretty tricky and we need to make sure to eliminate as many causes as possible before we dive deeper into that topic.

    if so, please let us know here and we will try to help as good as possible. but please understand that this plugin is not our main business and all support is done in our spare free time. somewhere we may find our limits in such rare error cases :/

    matt

    Thread Starter tmobilon

    (@tmobilon)

    Hi Matthias,

    I decided to keep it like this for now, as everything seems to be working fine with the fixes.

    I have another question, though. I want to use www as the sub to map the custom post type, but the plugin seems to be striping out the www from the mapping.

    It works when i use any other subdomain, but not with www. Is there a way to disable this stri_replace?

    I even tried to use set www.www.domain, but it doesn’t work either.

    Kind regards,

    Plugin Author matthias.wagner

    (@matthiaswagner)

    alright.
    the www/non-www handling is hardcoded by now, since it is our preferred way to deliver websites through www and forward any non-www traffic to the www subdomain. therefore we do not want to allow differences here. in earlier versions this was not included and had led to many questions from users, since it was necessary to enter both www and non www as mapping.

    since it seems to be easier for most users with this solution now, we will keep it like this.
    feel free to browse the code from earlier versions (see changelog to find out when it was introduced) and build your own version of the plugin to suit your needs – it’s open source ??

    good luck
    matt

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sitemap and canonical not working’ is closed to new replies.