Forums

Google couldn't fetch my sitemap.xml file

I've got a small flask site for my old wow guild and I have been unsuccessful in getting google to read my sitemap.xml file. I was able to successful verify my site using googles Search Console and it seems to crawl it just fine but when I go to submit my sitemap, it lists the status as "Couldn't fetch".

I originally used a sitemap generator website (forgot which one) to create the file and then added it to my route file like this:

@main.route('/sitemap.xml')

def static_from_root():

    return send_from_directory(app.static_folder, request.path[1:])

If I navigated to www.mysite.us/sitemap.xml it would display the expected results but google was unable to fetch it.

I then changed things around and started using flask-sitemap to generate it like this:

@ext.register_generator

def index():

    yield 'main.index', {}

This also works fine when I navigate directly to the file but google again does not like this.

I'm at a loss. There doesn't seem to but any way to get help from google on this and so far my interweb searches aren't turning up anything helpful. Has anyone else dealt with this before?

For reference, here is the current sitemap link: www.renewedhope.us/sitemap.xml

I'm afraid we don't have any special insights into Google requirements for the sitemap. This page https://support.google.com/webmasters/answer/183668?hl=en seems to have a whole lot of requirements. I checked a few for your case and they look ok, but perhaps there's something really non-obvious in there that you can try.

Thanks for your reply. I finally got it figured out. This seems to go against what google was advising but I submitted the sitemap as http://renewedhope.us/sitemap.xml and that finally worked.

From their documentation:

Use consistent, fully-qualified URLs. Google will crawl your URLs exactly as listed. For instance, if your site is at https://www.example.com/, don't specify a URL as https://example.com/ (missing www) or ./mypage.html (a relative URL).

I think that only applies to the sitemap document itself.

When submitting the sitemap to google, I tried:
http://www.renewedhope.us/sitemap.xml
https://www.renewedhope.us/sitemap.xml
https://renewedhope.us/sitemap.xml
None of which worked.

The only format that they were able to fetch the sitemap from was: http://renewedhope.us/sitemap.xml

Hope this information might help someone else facing the same issue :)