Errors Rank Match modules, robots.txt and sitemap.xml

#342154
  • Resolved Almudena Gomez
    Rank Math free

    Hello good day. I have several problems with the plugin and I would like to know how to solve it. I have installed the plugin, instead of Yoast.
    – URL /sitemap.xml does not redirect to sitemap_index.xml
    – It seems that my robots.txt has a redirect loop that prevents it from being displayed
    – It doesn’t let me activate any module, except the ones I’ve configured with the setup wizard (Monitor 404, Local Seo, redirections…etc)

    The domain is https://www.almugmcoach.com/

    Thanks a lot

Viewing 3 replies - 16 through 18 (of 18 total)
  • Hello,

    I have checked your site and I can see that the URLs that you’ve shared here are being redirected and yet, are appearing in the sitemap.

    However, I saw that you haven’t redirected these URLs using the Rank Math’s Redirection Module.

    May I know how are you redirecting these URLs so that I can investigate this further?

    Looking forward to helping you.

    Thank you.

    Thank you very much for the reply. Of course, as I told you, I have migrated from yoast seo to rank match, so it is impossible that I could do it with the rank match redirect module.
    The redirection is done manually via htaccess. This is the redirect:
    RewriteRule ^la-smile-of-almu.*$ https://www.almugmcoach.com/blog-coaching/ [R=301,L]

    Greetings

    Hello,

    The URLs should be removed from your sitemap automatically if they are already redirected.

    I see that you have already added this filter to your active theme’s functions.php file:

    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    In this case, here’s a filter to manually remove URLs from your sitemap:

    add_filter( 'rank_math/sitemap/entry', function ( $url, $type, $object ) {
    
            $urls_to_skip = array(
                    'https://yourdomain.com/redirected-URL-1',
                    'https://yourdomain.com/redirected-URL-2',
                    'https://yourdomain.com/redirected-URL-3',
            );
    
            if ( isset( $url['loc'] ) && in_array( $url['loc'], $urls_to_skip ) ) {
                    return false;
            }
    
            return $url;
    }, 10, 3 );

    You may need to update the URLs in the filter with the actual URLs that are still showing in your sitemap.

    I hope that helps.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 16 through 18 (of 18 total)

The ticket ‘Errors Rank Match modules, robots.txt and sitemap.xml’ is closed to new replies.