incorrect site map

#415677
  • Hi,
    i spllited my site map to 250 page per page.
    but in product site map rank math sets first page to 301 links second to 255 and third to 5.
    its absolutely wrong. because i have 505 published product. site map should be like this: 251(255+/shop) + 250 + 5
    there are duplicate links in first and second pages.
    whats the problem? using litespeed cache + cloudflare without cache

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

    Thank you for contacting Rank Math support, and sorry for any inconvenience that might have been caused due to that.

    Please follow the steps below to address this issue:

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/

    3. If the issue persists, kindly apply this filter code to your theme’s functions.php file and repeat step #1:

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

    Let us know how that goes. Looking forward to helping you on this one.

    i did the steps. still have the problem

    Hello,

    I did some further troubleshooting and noticed a issue:

    Upon testing the variations of your sitemap with https://httpstatus.io/, I found that two variations are returning 200 status. You can have a look at the screenshot in the sensitive data section of this ticket.

    Except for the preferred variation (which should return only a 200 status), all the non-preferred variations of the website should redirect to the preferred variation and return a 301 and 200 status.

    Please follow the steps in this link:
    https://rankmath.com/kb/couldnt-fetch-error-google-search-console/#num-5-check-for-the-correct-version-of-the-sitemap and redirect to the correct variation.

    You can also get in touch with your web host regarding this.

    Please let us know how that goes. We are here to assist.

    sorry i dont understand why your solution works for my problem???? rank math does not create site map correctly as i wrote before

    i have another website. this problem is over there too.
    there are 441 lessons but in site that i spllited it to 250 per page, first page has 301 link and second page has 191 links.
    something with rankmath is wrong

    Nigel
    Rank Math business

    Hello,

    Thank you for your patience as we look into why your product sitemaps are not being set to the saved number of pages. Thank you for letting us know the issue is happening on multiple websites I tested my own setup and replicated the issue. I have asked a developer to look into it. We’ll get back to you as soon as we have a fix for this.

    Screencast demo of sitemap set to 250 URLs but showing 301 instead: https://i.rankmath.com/qHgaw0

    Looking forward to helping you.

    well thanks a lot for understanding the problem. i will wait for the fix.

    Hello,

    We are glad that your issue was addressed. Rest assured that we will inform you once we release a fix for it. With that said, please do not hesitate to let us know if you need our assistance with anything else.

    Thank you.

    Hello,

    When you pass the 100 post marks we use increments of 100 for the sitemap generation, so if you add the 250 value we round up to 300.

    This is controlled by the $steps variable on the following file: wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/providers/class-post-type.php

    If you check the first value in the function to 1 you should be able to get increments of 1 for your sitemap links.

    We are also going to report this to the dev team so that we can either change that or set small info below the sitemap links letting users know of this behavior.

    Don’t hesitate to get in touch if you have any other questions.

    Hello,
    Thanks for you solution it works. i changed the steps from 100 to 1 in this function: “public function get_sitemap_links( $type, $max_entries, $current_page )”. now sitemaps work perfectly and there is no duplicate link in product pages.

    Hello,

    We are glad that your issue has been resolved.

    If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

    Hello,

    The latest release of our plugin already includes the necessary changes to make sure the sitemap numbers are accurate.

    You no longer need to fix this by editing plugin files.

    Don’t hesitate to get in touch if you have any questions.

    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 12 replies - 1 through 12 (of 12 total)

The ticket ‘incorrect site map’ is closed to new replies.