Rank Math error in non-existant Sitemap

#143679
  • Hi,

    I have been using Rank Math with pleasure for the last few weeks, but not using all its many features. Today I tried to understand what was going on with my sitemap (have used them before with Yoast), but RM showed me a link to where the xml supposedly was, and when I clicked on that link, I was informed there were errors on this and that line. Very strange as, when I look in the root of my file structure – where it purports to be – there is no file of that name there!

    I certainly haven’t knowingly created a sitemap, so this doesn’t make sense at all. And I can’t create one from scratch because it doesn’t present that option anywhere.

    Can someone clarify what’s going on?

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

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

    With Rank math, he sitemap is virtually and automatically generated for your site. You only need to enable which sitemaps you need. Please refer to this article: https://rankmath.com/kb/configure-sitemaps/

    As for the issue your re facing, please follow this guideline to fix it: https://rankmath.com/kb/fix-sitemap-issues/#xml-text-declaration

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    I discovered that my sitemap issue – blank lines at the top of any page in View Source – was apparently being caused by my child theme, Hello Elementor Child. So twelve hours ago I activated a new child theme, to see if that solved the problem – and it did, temporarily. But now, 18 hours later, I see the problem is back, i.e. when I click on https://rolanditen.com/sitemap_index.xml
    inside Rank Math admin area, I can no longer see my sitemap (which I could last night, for the first time ever, after making a new child theme). Instead there is that old error message: “This page contains the following errors:
    error on line 4 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.” (with nothing below it…)

    This is actually a very big deal, because I discovered at the same time that whereas Rank Math had allowed me to set nearly all my pages to “Index” in the Advanced tab, without showing any problem, when I checked in Google Search Console last night, for the first time ever, I found 65 NoIndex errors! So in spite of what my Rank Math admin area was showing me (In Advanced tab of each page – but I can’t include my screenshot for you, why not?), MY NEW SITE HAS NOT BEEN INDEXED SINCE IT WENT LIVE! So I am assuming that has something to do with my sitemap refusing to generate.

    If I had realized that my sitemap problem was hiding this much worse no-index problem, I would have dropped everything two weeks ago to try and fix it.

    That is a HUGE problem. Last night, after I created a new child theme, and was subsequently able to see my sitemap, I had to restart a request for validation from Google Search Console. My request is still pending with Google, but now I find that the sitemap error is back, so I fear that the two issues are connected, and that Google will once again fail to index my site because it finds “no index” everywhere. I cannot go on making copies of my child theme indefinitely; at some point I need to know what is upsetting my entire Rank Math installation!

    Can you confirm that a missing sitemap causes all the Indexes to be set to no-index without the user knowing about it? Or have I just been unlucky enough to have TWO major errors that are not connected?

    Thanks if you can help. Sooner or later my client is going to blame me for the lack of visitors to the website.

    OK, I discovered why I have blank lines at the top of every web page – they come from 3 lines I inserted into my functions.php file, which are essential to the site’s functionality. I can’t just remove them or the whole site will be affected. I am asking for help about that already on another forum.

    In the meantime, do you know if this sitemap problem is related to my “noindex” problem? The “noindex” problem is a much bigger worry to me than the sitemap, and I don’t even know where it came from.

    Thanks.

    Hello,

    Thank you for following up, and sorry for the delay.

    In this case, Google Search Console will mark your pages/posts as noindex since it can’t crawl your sitemap. Also, have you tried manually submitting URLs to your Google Search Console account?

    If that didn’t help, could you please try a 3rd party sitemap plugin and see if the sitemap issue still persists? Just make sure you have disabled the Sitemap module of Rank Math in WordPress Dashboard > Rank Math > Dashboard when using a 3rd party sitemap plugin.

    If the other plugin works, please do let us know.

    I hope that helps. Thank you, and looking forward to your update.

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

You must be logged in to reply to this ticket.