Google Search Console says "Couldn't Fetch"
NichtsHsu opened this issue · comments
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.
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?
Hi @ashmaroli ,
I suppose, the problem is caused by subdomain.
When I looked at the https://gm8.nihil.cc//sitemap.xml, I got this result...
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.
Regarding validation, the two links seem good as per following:
- https://www.xml-sitemaps.com/validate-xml-sitemap.html?op=validate-xml-sitemap&go=1&sitemapurl=https%3A%2F%2Fnihil.cc%2Fsitemap.xml&submit=Validate+Sitemap
- https://www.xml-sitemaps.com/validate-xml-sitemap.html?op=validate-xml-sitemap&go=1&sitemapurl=https%3A%2F%2Fgm8.nihil.cc%2Fsitemap.xml&submit=Validate+Sitemap
@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,
while the other sitemap shows up like this;
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 ofnihil.cc
I tried sitemap.xml
and /sitemap.xml
:
@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
.
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... 🤷♂️
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.