incorrect urls appearing in sitemap

#781633
  • Hi team,

    We are using Business version of rankmath linked with the account c****@r***************.
    I am facing a strange issue on camdenroofinggc.com
    Below page in sensitive area are appearing in the page sitemap (https://camdenroofinggc.com/page-sitemap.xml)

    But this page does not exist however, page sitemap is still pointing to it. I have tried regenrating the page-sitemap too and cleared cache as well but still same issue persists.

    Please have a look to the area as details are shared. Please let me know if any additional detail is needed.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    Thank you for reaching out to us regarding the incorrect URLs appearing in the sitemap of camdenroofinggc.com. I understand that the page-sitemap.xml is pointing to a sensitive area page that does not exist on your website.

    To address this issue, you can add the following code to your theme’s functions.php file:

    // Exclude sensitive area from the sitemap
    add_filter( 'rank_math/sitemap/url', function( $url ) {
        if ( strpos( $url, '/sensitive-area/' ) !== false ) {
            return false;
        }
        return $url;
    });

    By adding this code snippet, you can exclude the sensitive area from being included in the sitemap. This should resolve the issue of incorrect URLs appearing in the sitemap.

    If you need any further assistance or additional details, please feel free to let us know.

    Thank you for your understanding and cooperation.

    Best regards.

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    Google URL Inspection API Integration in Rank Math
    Multilingual SEO with Rank Math SEO & WPML » Rank Math
    Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    Hello,

    Thank you for your patience.

    The URLs you have shared are redirecting to new URLs, however, the destination is getting a critical error.

    Please note that redirected URLs are not going to remove the previous URLs from your sitemap. You may need to either delete/unpublish them on your WordPress or set them to noindex.

    Regarding the critical error, you may get in touch with your web host for assistance in retrieving the error log.

    Having an error log will help determine what is causing the critical error on those destination URLs.

    Looking forward to helping you.

    Hi,

    Are you sure you are looking at right concern as I am not feeling the same from your comments ?

    What critical error you are mentioning ? I have run httpstatus.io on 4 urls and they are returning 301 200. That means the destaination url (redirected ones) is working and visible without any error ! So what makes you believe some ciritcal error is coming ? The source url page does not exist (or already unpublished). You have been given the access to wordpress area. Did you find the source page present ? It is my humble request to please have a look again

    Hello,

    We apologize for the inconvenience.

    We would like to check this further on your website’s WP admin but it seems the user access you shared is very limited at the moment.

    Can you please elevate our access to admin so we can check further the issue?

    Looking forward to helping you.

    lindeymagee
    Rank Math free

    please try now.

    Hello,

    We still can’t access the settings in your admin. It is very limited. See the screenshot in the sensitive data section. Please verify again from your end.

    Please note that even if you have redirected the old URL of that page, that page must be deleted or set to noindex to be removed from the sitemap.

    Looking forward to helping you.

    Sorry for replying late. Some other issue took priority and I could not reply. I have given you the access. Please try and have a look.

    Jeremy, in my first comment I have mentioned this.
    “The source url page does not exist (or already unpublished)”

    I do not see the page exist. I have given the access, please have a look.

    Hello,

    We logged in to your site using the details provided in the sensitive data section.

    The pages you shared in the sensitive data section do exist on your website and that is why they appear in your page sitemap. We have set them to noindex and they are no more appearing in your page sitemap.

    Hope that helps and do no hesitate to let us know if you need further assistance.

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this ticket.