Rank Math error in non-existant Sitemap

#143679
  • Resolved Swisspenelope
    Rank Math free

    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 5 replies - 1 through 5 (of 5 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.

    Swisspenelope
    Rank Math free

    Hi – thanks for your reply. I meant to get back to you earlier and forgot. The lines in my functions.php file refer to small php files I wrote, and by mistake I put ?> at the end of each file, which I shouldn’t have, as these files were in the includes directory. So for each file that had this error, my code still worked, but a blank line was added to each page when the sitemap was created.

    Since then I’ve removed those ?> and the sitemap is generated okay.

    I think it is vital that you mention ON THE SITEMAP PAGE that if there is ANY problem with generating the sitemap, everything is marked NOINDEX. I had no way of knowing there would be such a serious consequence! If I had known that, I would have dropped everything and put back the Go Live date of my site if necessary, until I had found the problem. Instead, I had 2 weeks of NoIndex after the site went live, and a month later I am still struggling to get Google to redo the indexing, because there is a daily quota of pages you are allowed to ask to be re-indexed.

    This “feature” of the sitemap is really a big deal, so people should be warned about it up front.

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

You must be logged in to reply to this ticket.