jekyll / jekyll-sitemap

Jekyll plugin to silently generate a sitemaps.org compliant sitemap for your Jekyll site

Home Page:http://rubygems.org/gems/jekyll-sitemap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Google Search Console says "Couldn't Fetch"

NichtsHsu opened this issue · comments

commented

I'm using jekyll-sitemap to generate sitemap for my blog, url is https://nihil.cc/sitemap.xml. When I try to add it to sitemap on Google Search Console, it tells me that "Couldn't Fetch". Some say adding a forward slash works, but https://nihil.cc//sitemap.xml still gives me a "Couldn't Fetch".

Can anyone give some suggestions?

You need to make sure that the url in the _config.yml file is set as follows;

url                      : https://nihil.cc

Interesting!! You can see sitemap.xml in the root directory of the created _site folder, right? I'm just asking to be sure. Maybe the sitemap is not rendering properly.

commented

You can see sitemap.xml in the root directory of the created _site folder

Yes, it is.

Could you post a screenshot of the actual error rendering on your browser?

commented

I suppose, the problem is caused by subdomain.

When I looked at the https://gm8.nihil.cc//sitemap.xml, I got this result...

Screenshot 2022-12-29 at 17 42 28

You said earlier that you set the url as "https://nihil.cc". You have to do same thing for subdomain.

@NichtsHsu Thanks for the screenshot.
I thought you had added an entry for https://nihil.cc//sitemap.xml as well.. but don't see that in your listing.

@NichtsHsu In the GSC Dashboard Sidebar, try adding the sitemap url to the property https://nihil.cc/ instead of nihil.cc (DOMAIN PROPERTY).

I had gotten a similar error too. If I'm not mistaken, this problem is related to the subdomain. When you set the url as https://nihil.cc in _config.yml, I guess the Jekyll-sitemap plugin creates a sitemap just for it by overriding localhost to https://nihil.cc. I had solved this problem by creating a separate template for the subdomain and in this separate template, I had set the url as subdomain. If you notice,

Your https://gm8.nihil.cc//sitemap.xml shows up like this,

Screenshot 2022-12-29 at 17 42 28

while the other sitemap shows up like this;

Screenshot 2022-12-29 at 18 20 45

commented

I suppose, the problem is caused by subdomain.

Now I fixed the sitemap of my subdomain, but not improved.

I thought you had added an entry for https://nihil.cc//sitemap.xml as well.. but don't see that in your listing.

When I tried to add https://nihil.cc//sitemap.xml, GSC automatically changed it to https://nihil.cc/sitemap.xml.

try adding the sitemap url to the property https://nihil.cc/ instead of nihil.cc

I tried sitemap.xml and /sitemap.xml:

image

@NichtsHsu The property entry for https://nihil.cc/ look good to me. Let's wait for a couple of days to see if Google's crawlers report positively after getting plenty of time to crawl through every link in /sitemap.xml.

commented

Response after one month: GSC still can't fetch my sitemap.

But a funny thing happened: the sitemap itself is indexed when none of my new posts are indexed:

image

I feel sorry that this is still an issue, @NichtsHsu. Have you tried reaching out to Google support team? Perhaps, they can tell you what exactly is wrong... 🤷‍♂️

commented

It seems that there are already a lot of the same issue in the Google search console community, and most people don't get a working solution. I just tested Bing Webmaster Tool and it fetch my sitemap just fine. So it looks like I have nothing to do but fxxk Google.

Workaround: Add a redirect from the main (www or apex) website to the target website's sitemap. Below is an example when using Cloudflare Pages redirect:

/sitemap_blog.xml https://blog.example.com/sitemap.xml

Then submit the sitemap URL on the main website (i.e. https://www.example.com/sitemap_blog.xml) to Google.