XML sitemap has error

#142654
  • Resolved Ben Morrow
    Rank Math free

    Hi, the sitemap generated by Rank Math seems to have an error when loading it:

    “This page contains the following errors:
    error on line 2 at column 6: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.”

    (nothing appears below)

Viewing 14 replies - 1 through 14 (of 14 total)
  • Danial
    Rank Math business

    Hello,

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

    This error suggests that there is a conflict between Rank Math and one of your installed plugins. To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Try enabling only Rank Math, then check if the function is working. Then try enabling each plugin one by one until you found the conflicting plugin.

    I hope this resolves your issues.

    Hello,

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

    Upon checking your sitemap page, I noticed some white-space present in the first line which causes the error. Please see the screenshot I inserted in the Sensitive Data section.

    You can quickly test if this is the case by switching to one of the stock WP themes and check if you can reproduce this issue.

    That is usually due to extra whitespace at the end or beginning of the functions.php file on your theme. You can check it and try to remove it, but if you don’t find it, let us know and we will be happy to take a look for you.

    We are looking forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Thank you. I was able to fix the whitespace issue.

    I have a membership site which uses Ultimate Member to create member profiles. These are technically authors in WordPress, so I have enabled the author sitemap. I have over 1000 members, but the author sitemap only have 34 pages. Is something going wrong with the plugin here? Please see the sitemap in the sensitive section.

    Hello,

    Thank you for keeping in touch with us, this looks like this is a caching issue, or the author pages that are not in here are non-indexed.

    Please share the affected URL(s) which is not included in the sitemap so we can take a look at it.

    Also, can you please follow these steps if the issue is cache related?

    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/

    Let me know how it goes, we are looking forward to helping you.

    Hi, I have tried these and the sitemaps still only have 34 pages.

    Febby
    Rank Math free

    Hello,

    Could you try changing the link per sitemap to 1000 and flush permalinks then finally please clear your site/server cache to see if that resolves your issue?

    Please see the screencast below:
    https://i.rankmath.com/6SFa9S

    Let us know if that helps.

    Hi, tired this and still no progress unfortunately.

    Danial
    Rank Math business

    Hello,

    Can you perhaps share with us your WP-Admin details?

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Thanks – updated

    Hello,

    Thanks for getting back to us.

    Upon inspecting your website I noticed that you have around 60 page published, but a lot of them have the noindex meta robots tag applied to them, and that’s why they are not showing up in your sitemap.
    No index pages

    Remember that Rank Math doesn’t include in the sitemap any page/post marked with the noindex robots tag.

    Hope this clarifies your doubts.

    Don’t hesitate to get in touch if you require any further assistance.

    Thanks for the reply.

    All of the pages in the author sitemap are coming from the Ultimate Member plugin and have the prefix https://senseistar.com/user/* or https://senseistar.com/ja/user/* for Japanese. Since the neither the user page in English or Japanese is set to noindex, I don’t see why the author pages aren’t showing up in the author sitemap – it makes even less sense that only 34 URLS have been included, when the the site have around 1,200 users.

    Hello,

    Your author pages appear to have their canonical URLs pointing to the main user page, check the screenshot I have added in the sensitive section.

    Would you please check with the membership plugin if this is intended or the canonical can be changed to be self canonical for the author pages?

    Rank math sitemaps automatically exclude pages that have canonical URLs defined explicitly. Please refer to this to know how the canonical works to prevent indexing of duplicate pages: https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls

    Looking forward to heling 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 14 replies - 1 through 14 (of 14 total)

The ticket ‘XML sitemap has error’ is closed to new replies.