Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next 13 - Sitemap can't fetch on Google Search Console #51649

Closed
1 task done
anthonyjacquelin opened this issue Jun 22, 2023 · 70 comments
Closed
1 task done

Next 13 - Sitemap can't fetch on Google Search Console #51649

anthonyjacquelin opened this issue Jun 22, 2023 · 70 comments
Labels

Comments

@anthonyjacquelin
Copy link

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 22.1.0: Sun Oct  9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64
    Binaries:
      Node: 18.16.0
      npm: 9.5.1
      Yarn: 1.22.19
      pnpm: 7.29.3
    Relevant packages:
      next: 13.4.6
      eslint-config-next: 13.2.4
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 4.9.5

Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true)

Link to the code that reproduces this issue or a replay of the bug

https://codesandbox.com

To Reproduce

export default async function sitemap() {
  const db = await connecToDatabase();
  const usersCollection = db.collection("Users");

  // articles
  const articles = await API.getPosts(
    "",
    undefined,
    undefined,
    "published"
  )
    .then((res) => res)
    .catch((error) => console.log("error fetching content"));
  const articleIds = articles?.map((article: Article) => {
    return { id: article?._id, lastModified: article?.createdAt };
  });
  const posts = articleIds.map(({ id, lastModified }) => ({
    url: `${URL}/${id}`,
    lastModified: lastModified,
  }));

  // users
  const profiles = await usersCollection.find({}).toArray();
  const users = profiles
    ?.filter((profile: User) => profile?.userAddress)
    ?.map((profile: User) => {
      return {
        url: `${URL}/profile/${profile.userAddress}`,
        lastModified: new Date().toISOString(),
      };
    });

  // tags
  const tagsFromDb = await articles
    ?.map((article: Article) => article?.categories)
    ?.flat();

  const uniqueTags = tagsFromDb.reduce((acc, tag) => {
    const existingTag = acc.find((item) => item.id === tag.id);

    if (!existingTag) {
      acc.push(tag);
    }

    return acc;
  }, []);

  const tags = uniqueTags
    ?.filter((tag) => tag?.id)
    ?.map((tag) => {
      return {
        url: `${URL}/tags/${tag.id}`,
        lastModified: new Date().toISOString(),
      };
    });

  const staticPages = [
    {
      url: `${URL}`,
      lastModified: new Date().toISOString(),
    },
    { url: `${URL}/about`, lastModified: new Date().toISOString() },
    { url: `${URL}/read`, lastModified: new Date().toISOString() },
  ];

  return [...posts, ...users, ...tags, ...staticPages];
}

Describe the Bug

Hello,

I'm using Next 13 with the /app directory and trying to configure the sitemap of my project on Google search console.

I have used the documentation as described there: Documentation

I have a sitemap.ts in the root of my /app directory, but it seems not recognized by GSC, and i know the sitemap is valid: URL and i've checked also using this tool

Xnapper-2023-06-22-13 15 56

Expected Behavior

I want the /sitemap.xml to be recognized by Google search console.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

@anthonyjacquelin anthonyjacquelin added the bug Issue was opened via the bug report template. label Jun 22, 2023
@SuttonJack
Copy link

Do you have a file at app/robots.ts? See here for an example.

This file lets engines and crawlers know where to find your sitemap. You can read more about it here

@ryuji-orca
Copy link

Do you have a file at app/robots.ts? See here for an example.

This file lets engines and crawlers know where to find your sitemap. You can read more about it here

same issue.
I have enabled the sitemap and have added the following code to app/robots.ts but cannot register the sitemap.

import type { MetadataRoute } from "next"

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [
      {
        userAgent: "*",
      },
    ],
    sitemap: "https://my-url.xyz/sitemap.xml",
    host: "https://my-url.xyz",
  }
}

Maybe some more time needs to pass, so I'll give it a little more time.

@JasonA-work
Copy link

Have you tried putting it in the /public folder instead?

@ryuji-orca
Copy link

Have you tried putting it in the /public folder instead?

I've tried, but no...,
I don't think public has anything to do with it because the official and leerob sites put their sitemap and robots files in app/.

https://github.com/vercel/commerce/blob/70dcfa9736bb2067713a425e17ee6e59fb3fca2b/app/sitemap.ts#L8
https://github.com/leerob/leerob.io/blob/main/app/sitemap.ts

@anthonyjacquelin
Copy link
Author

Has someone solved this issue ? I'm still stuck on it without any pieces of possible solution...

@CJEnright
Copy link

Also experiencing this. Putting a sitemap.xml file in public with appdir cannot be parsed by Google Search Console. Falling back to pages and following this older tutorial does work.

@anthonyjacquelin
Copy link
Author

anthonyjacquelin commented Jul 4, 2023

Also experiencing this. Putting a sitemap.xml file in public with appdir cannot be parsed by Google Search Console. Falling back to pages and following this older tutorial does work.

I tried but even if my new sitemap is valid, nothing changed...

@loverphp487
Copy link

Has someone solved this issue ? I'm still stuck on it without any pieces of possible solution...

i did as same document of next.js has wroten for robots.ts and sitemap.xml and has same problem

@anthonyjacquelin
Copy link
Author

anthonyjacquelin commented Jul 25, 2023

Has someone managed this error in any ways ? Still encounter the problem on my side

@octane96
Copy link

octane96 commented Aug 8, 2023

Next 13.4.7
I have the same problem.
I can see the sitemap.xml path from my browser as far as I can access it...

@octane96
Copy link

octane96 commented Aug 9, 2023

After saving the dynamically generated sitemap.xml from the browser and storing it in the public directory, Google Search Console was able to load it.
I am not sure if this is a Next.js issue or a Google Search Console issue, but I will get by with this for now.
Very disappointed...

@anthonyjacquelin
Copy link
Author

After saving the dynamically generated sitemap.xml from the browser and storing it in the public directory, Google Search Console was able to load it.

I am not sure if this is a Next.js issue or a Google Search Console issue, but I will get by with this for now.

Very disappointed...

Thanks for your feedback, so at the end of the day this is not dynamic anymore...

@octane96
Copy link

octane96 commented Aug 9, 2023

Thanks for your feedback, so at the end of the day this is not dynamic anymore...

That's right...
I agree.

@anthonyjacquelin
Copy link
Author

anthonyjacquelin commented Aug 9, 2023

Thanks for your feedback, so at the end of the day this is not dynamic anymore...

That's right...

I agree.

So maybe we could create a cron api route that will write this sitemap.xml file every day or week using fs

@octane96
Copy link

octane96 commented Aug 9, 2023

Thanks for your feedback, so at the end of the day this is not dynamic anymore...

That's right...
I agree.

So maybe we could create a cron api route that will write this sitemap.xml file every day or week using fs

Thanks for the very good ideas!
I've written a simple cron for now, so I'll get by with that for a while!

@octane96
Copy link

octane96 commented Aug 9, 2023

This is a bit off topic, but it seems that sitemap.ts is built static.
Is that how it is supposed to be...?

If so, it does not have to be cron.

@anthonyjacquelin
Copy link
Author

This is a bit off topic, but it seems that sitemap.ts is built static.

Is that how it is supposed to be...?

If so, it does not have to be cron.

I'm not sure that sitemap.xml has to be statically generated.

The most important thing is to have an up to date version of your sitemap if you have dynamic pages being created.

@octane96
Copy link

octane96 commented Aug 9, 2023

The most important thing is to have an up to date version of your sitemap if you have dynamic pages being created.

I agree.

Sorry if I didn't communicate it well.
I could see the build log at hand, which seems to be dynamically generated only at build time to begin with.
I wish it would always be generated dynamically.

@lucas-soler
Copy link

Hi guys!

I think it is not an error. Neither on Google nor Vercel. Better saying, I'm not sure it is not kinda an error on Google, because I really think it should have a better message to this situation. You can read further info about this in the link below:
https://support.google.com/webmasters/thread/184533703/are-you-seeing-couldn-t-fetch-reported-for-your-sitemap?hl=en&sjid=15254935347152386554-SA

I spent 30 minutes searching on the web thinking it was a problem.

@anthonyjacquelin
Copy link
Author

anthonyjacquelin commented Aug 12, 2023

Hi guys!

I think it is not an error. Neither on Google nor Vercel. Better saying, I'm not sure it is not kinda an error on Google, because I really think it should have a better message to this situation. You can read further info about this in the link below: https://support.google.com/webmasters/thread/184533703/are-you-seeing-couldn-t-fetch-reported-for-your-sitemap?hl=en&sjid=15254935347152386554-SA

I spent 30 minutes searching on the web thinking it was a problem.

If it is not a bug and just due to time needed for google to process the sitemap, all our sitemaps would have been handled by google after a while. The fact is that even after 1 month i still see "can't fetch".

So there might be a bigger problem than just a messy error message + time needed for google to handle it.

@c100k
Copy link

c100k commented Aug 22, 2023

I'm not using the app folder (my sitemap.xml is a simple public file) and I had the same issue.

After waiting for almost a month, I tried something else : I created sitemap2.xml and it fetched it successfully. Both files are identical...

Screenshot 2023-08-22 at 16 46 10

I think Google keeps some cache of a file and if it failed retrieving it once, it fails again and again. So probably not related to Next.js at all.

@ryuji-orca
Copy link

It's been quite a while since I posted the first article, but it still hasn't been registered in the sitemap 😓.

The following issue states that after changing from <xml version="1.0" encoding="UTF-8">...</xml> to <?xml version="1.0" encoding="UTF-8"?>, it was reported that it got registered in the Search Console. However, in the case of the app's sitemap.xml, is it necessary to include the <?xml version="1.0" encoding="UTF-8"?> declaration? 🧐.

Google Article

I've also noticed someone on X experiencing the same error as me. However, it seems to be happening with Remix as well, so it might be a problem on Google's side.

@seogki
Copy link

seogki commented Aug 29, 2023

I end up create sitemap.xml file in public and copy pasted created sitemap.xml file through nextjs

Now google is able to find my sitemap.xml...

but i still want valid information too because i don't want copy paste all the time whenever my sitemap changes

@anthonyjacquelin
Copy link
Author

Anyone using the app directory managed to make it work ?

@iperdev
Copy link

iperdev commented Sep 15, 2023

After encountering the same issues as you had, in my case with "next": "13.4.19" App Router and their native solution for sitemap (https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#generate-a-sitemap)

I found this article and applied the Next.js 13.2 and lower solution proposed by the article https://claritydev.net/blog/nextjs-dynamic-sitemap-pages-app-directory#nextjs-132-and-lower

What happened?
The route app/sitemap.xml/route.ts didn't work, and I suspected it might be due to caching by Google...

...so I tried app/sitemap2.xml/route.ts, and it worked (yep, same code...)

Now, sitemap2.xml is working properly in Google Search Console.

My sitemap.xml is still available with the same code, but Search Console is unable to fetch it. I removed it and added it again, and it's still not working. So, my plan is to remove it for some days or weeks and then try adding it again. At least, I'm indexing with sitemap2.xml, which is dynamic.

@felri
Copy link

felri commented Sep 16, 2023

After encountering the same issues as you had, in my case with "next": "13.4.19" App Router and their native solution for sitemap (https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#generate-a-sitemap)

I found this article and applied the Next.js 13.2 and lower solution proposed by the article https://claritydev.net/blog/nextjs-dynamic-sitemap-pages-app-directory#nextjs-132-and-lower

What happened? The route app/sitemap.xml/route.ts didn't work, and I suspected it might be due to caching by Google...

...so I tried app/sitemap2.xml/route.ts, and it worked (yep, same code...)

Now, sitemap2.xml is working properly in Google Search Console.

My sitemap.xml is still available with the same code, but Search Console is unable to fetch it. I removed it and added it again, and it's still not working. So, my plan is to remove it for some days or weeks and then try adding it again. At least, I'm indexing with sitemap2.xml, which is dynamic.

I tried that

export async function GET(req: NextRequest) {
  const sitemap: any = await getSitemap();

  const toXml = (urls: any) => `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
${urls
  .map((item: any) => {
    return `
<url>
    <loc>${item.url}</loc>
    <lastmod>${item.lastModified}</lastmod>
    <changefreq>${item.changeFrequency}</changefreq>
    <priority>${item.priority}</priority>
</url>
    `;
  })
  .join('')}
</urlset>`;

  return new Response(toXml(sitemap), {
    status: 200,
    headers: {
      'Cache-control': 'public, s-maxage=86400, stale-while-revalidate',
      'content-type': 'application/xml'
    }
  });
}

But google can't find it, I also tried the sitemap2.xml inside the public folder and I got the same error.

@didyk
Copy link

didyk commented Oct 6, 2023

Have the same issue with pages router. My sitemap google can't fetch at least 6 months. I tried with sitemap2.xml inside the public folder and it doesn't work too.

Does someone have successfully experience with adding sitemap and pages router?

@slamer59
Copy link

I just found out that the sitemap.xml is returning HTTP 304 instead of HTTP 200.

robots.txt returns HTTP 200 and is working fine.

Really need @leerob @amyegan to chime in on this.

I also had a 304 code

I tried to
export const dynamic = "force-dynamic"

But i still experienced couldn't fetch ...

@ruchernchong
Copy link

I just found out that the sitemap.xml is returning HTTP 304 instead of HTTP 200.
robots.txt returns HTTP 200 and is working fine.
Really need @leerob @amyegan to chime in on this.

I also had a 304 code

I tried to export const dynamic = "force-dynamic"

But i still experienced couldn't fetch ...

I used the unstable_noStore() and it did not work despite the sitemap.xml is now returning HTTP 200.

@iamjoshua
Copy link

A week after submitting my Next.js 14/app dir sitemap to google search console and it still showed a "Sitemap could not be read" error. I think, though I'm not sure, that I submitted the sitemap before adding the robots.txt file to the app directory. Even though Googlebot was allowed to view the sitemap, perhaps it had an outdated cache of its permissions.

With this hunch, I use the "URL inspection" bar in Google Search Console and inspected my sitemap.xml. It gave me an error. I then inspected my robots.txt url without error. I then reinspected my sitemap and this time there was no error. I went back to the sitemap page, removed the existing reference, and resubmitted my sitemap. This time it instantly fetched my sitemap with a success status.

Perhaps this will help others with this issue.

@ruchernchong
Copy link

A week after submitting my Next.js 14/app dir sitemap to google search console and it still showed a "Sitemap could not be read" error. I think, though I'm not sure, that I submitted the sitemap before adding the robots.txt file to the app directory. Even though Googlebot was allowed to view the sitemap, perhaps it had an outdated cache of its permissions.

With this hunch, I use the "URL inspection" bar in Google Search Console and inspected my sitemap.xml. It gave me an error. I then inspected my robots.txt url without error. I then reinspected my sitemap and this time there was no error. I went back to the sitemap page, removed the existing reference, and resubmitted my sitemap. This time it instantly fetched my sitemap with a success status.

Perhaps this will help others with this issue.

This did not work for me unfortunately. It still "cannot be read" by Google.

@MrTob
Copy link

MrTob commented Feb 27, 2024

same error here

@andyechc
Copy link

andyechc commented Mar 1, 2024

I use React with Vite with the sitemap.xml in the public folder and have the same error: Couldn't fech in https://studio20.vercel.app/sitemap.xml
So I tried: https://studio20.vercel.app/sitemap.xml/ and still not work.
I change the sitemap file name to sitemap-1.xml and it doesn't work too
I no have idea of what to do.

@ruchernchong
Copy link

I use React with Vite with the sitemap.xml in the public folder and have the same error: Couldn't fech in https://studio20.vercel.app/sitemap.xml So I tried: https://studio20.vercel.app/sitemap.xml/ and still not work. I change the sitemap file name to sitemap-1.xml and it doesn't work too I no have idea of what to do.

Interesting. Although, this is issue is not related to Vercel, but interesting to see that React with Vite is not working as well.

@andyechc
Copy link

andyechc commented Mar 5, 2024

I use React with Vite with the sitemap.xml in the public folder and have the same error: Couldn't fech in https://studio20.vercel.app/sitemap.xml So I tried: https://studio20.vercel.app/sitemap.xml/ and still not work. I change the sitemap file name to sitemap-1.xml and it doesn't work too I no have idea of what to do.

Interesting. Although, this is issue is not related to Vercel, but interesting to see that React with Vite is not working as well.

Ok, after making all those changes to my sitemap, I renamed the file to sitemap.xml and today when I entered the Search Console, I realized that the first submission of my sitemap was correct, and waiting to index This confirms that it is something related to Google or something else, the truth is that I am confused. A friend who uses Flutter also had a problem with the sitemap, but after having fetch problems, he went to check the file in the search console and when it came back, the sitemap had been read correctly and everything was in order. I think Google has to fix that, it's really crazy

@lydhr
Copy link

lydhr commented Mar 6, 2024

It seems to be an issue of Google Search Console. My solution was, on Google Search Console, submitting the sitemap url with a suffix: yourwebsite.com/sitemap.xml?sitemap=1 instead of yourwebsite.com/sitemap.xml
Reference

FYI, I used next-sitemap package to auto generate my sitemap.xml at every new build.

@Shubham-EV
Copy link

anyone able to solve it ?

@ruchernchong
Copy link

anyone able to solve it ?

No. Problem might lie with Google Search Console instead.

@Tyerlo
Copy link

Tyerlo commented Apr 1, 2024

I had the problem for a long time, but finally resolved it. I made the files static and put them inside the public folder. Created a sitemap.xml and a robots.txt

I also had a middleware that handles languages on route and had to add

export const config = {
	// Matcher ignoring `/_next/` and `/api/`
	matcher: [
		"/((?!api|_next/static|_next/image|sitemap.xml|robots.txt|favicon.ico).*)" //sitemap.xml and robots.txt to make it to work
	]
};

Be sure that robots.txt can be crawled going into settings inside Google search console and then Crawling robots and then open report, click on the three dots and request a recrawl, after that I could add the sitemap.xml and it succeeded

@Shubham-EV
Copy link

@Tyerlo where did you put this code and what is this file name?

@Tyerlo
Copy link

Tyerlo commented Apr 1, 2024

@Tyerlo where did you put this code and what is this file name?

I have a middleware.ts file that handle languages on routes.

Here's the entire file

import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";

import { i18n } from "./i18n.config";

import { match as matchLocale } from "@formatjs/intl-localematcher";
import Negotiator from "negotiator";

function getLocale(request: NextRequest): string | undefined {
	const negotiatorHeaders: Record<string, string> = {};
	request.headers.forEach((value, key) => (negotiatorHeaders[key] = value));

	// @ts-ignore locales are readonly
	const locales: string[] = i18n.locales;
	const languages = new Negotiator({ headers: negotiatorHeaders }).languages();

	const locale = matchLocale(languages, locales, i18n.defaultLocale);
	return locale;
}

export function middleware(request: NextRequest) {
	const pathname = request.nextUrl.pathname;
	const pathnameIsMissingLocale = i18n.locales.every(
		(locale) => !pathname.startsWith(`/${locale}/`) && pathname !== `/${locale}`
	);
	const isExcludedPath = pathname.startsWith("/img/");
	if (isExcludedPath) {
		// Skip i18n modification for images or other excluded paths
		return;
	}
	// Redirect if there is no locale
	if (pathnameIsMissingLocale) {
		const locale = getLocale(request);

		if (locale === i18n.defaultLocale) {
			return NextResponse.rewrite(
				new URL(
					`/${locale}${pathname.startsWith("/") ? "" : "/"}${pathname}`,
					request.url
				)
			);
		}
		return NextResponse.redirect(
			new URL(
				`/${locale}${pathname.startsWith("/") ? "" : "/"}${pathname}`,
				request.url
			)
		);
	}
}

export const config = {
	// Matcher ignoring `/_next/` and `/api/`
	matcher: [
		"/((?!api|_next/static|_next/image|sitemap.xml|robots.txt|favicon.ico).*)"
	]
};

@baxsm
Copy link

baxsm commented Apr 27, 2024

I just found out that the sitemap.xml is returning HTTP 304 instead of HTTP 200.

robots.txt returns HTTP 200 and is working fine.

Really need @leerob @amyegan to chime in on this.

It might not be the case. The 304 is just a redirect as it's pulling it from the cache, try ctrl + f5 and it'll be 200.

@bouia
Copy link

bouia commented Jun 11, 2024

I added a trailing slash to my sitemap and it started to work. Both links are loading fine on the browser.
/sitemap.xml/
And Google managed to pick it up.
image
https://ruchern.xyz/sitemap.xml/

Next.js 14 App dir here, had the same issue here where Google just says couldn't fetch.

Switched from using sitemap.ts to a sitemap.xml/route.ts to render out my sitemap but no difference.

But adding the trailing slash worked

image

Adding a trailing slash worked for me as well, thank you!

@haoolii

This comment has been minimized.

@devjiwonchoi
Copy link
Member

devjiwonchoi commented Aug 4, 2024

Hey everyone, seems like the latest canary works, please try and lmk!

@anthonyjacquelin Please reopen if you face the same issue, but with a valid repro link (current is just codesandbox.com). Thank you!

@devjiwonchoi devjiwonchoi closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2024
@JannikZed
Copy link

@devjiwonchoi can you let me know exactly which version you tested and can we find out, what has been changed to fully understand this issue? Bing seems to read and process the sitemap, so I would really like to understand, what is different, as we also can't just roll-out canary versions in production.

@devjiwonchoi
Copy link
Member

exactly which version you tested and can we find out, what has been changed to fully understand this issue

@JannikZed You are absolutely right, will investigate the root cause of this issue!

@devjiwonchoi devjiwonchoi reopened this Aug 9, 2024
@devjiwonchoi
Copy link
Member

devjiwonchoi commented Aug 21, 2024

Hey everyone, I've investigated the issue and want to share the result.

TL;DR

Many issues mentioned in the thread are mostly caused by middleware matcher, sitemap, or robots misconfiguration.
Also, the tip from John Mueller (adding trailing slash or query param) to refresh the fetch from Google Search worked.

Middleware Matcher Configuration

If you have middleware in your project and have yet to exclude the sitemap on the matcher config, it may cause an issue when accessed. You can try excluding the sitemap path from your middleware. For clearer guidance we will update the docs for it.

export const config = {
  matcher: [
    /*
     * Match all request paths except for the ones starting with:
     * - _next/static (static files)
     * - _next/image (image optimization files)
     * - favicon.ico, sitemap.xml, robots.txt (metadata files)
     */
    '/((?!_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)',
  ],
}

General Sitemap Misconfiguration

This includes:

  1. Blocked by robots.txt
  2. Invalid URL (or redirected)
  3. Google needs to re-fetch
  4. General errors that need awaiting
  5. and more.

Based on the tip from John Mueller, editing the URL may do the trick, which is why the tricks in the comments: adding trailing slash, or query param did work.

Also, if you click the "Couldn't fetch" element, you can view why it wasn't fetched.

Example of couldn't fetch cause of HTTP 404

Screenshot 2024-08-16 at 3 07 32 PM

@JannikZed

next info of my device

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6030
  Available memory (MB): 36864
  Available CPU cores: 12
Binaries:
  Node: 18.18.0
  npm: 9.8.1
  Yarn: N/A
  pnpm: 9.5.0
Relevant Packages:
  next: 14.2.5 // Latest available version is detected (14.2.5).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.4
Next.js Config:
  output: N/A

Screenshot 2024-08-21 at 6 28 59 PM

https://jiwonchoi.dev/sitemap.xml (checkout the lastMod date)

If you still have issues, please open a new issue with a reproduction. Thank you!

@c100k
Copy link

c100k commented Aug 29, 2024

@devjiwonchoi thanks for your investigation. But there is another problem for sure. I curl-ed your website and compared to mine and the only difference is you using HTTP/2 and 1.1 on my side. But pretty sure it does not come from here.

Plus he Google console does not give any details on why it failed. Unlike on your screenshots, there is no caret with details on my side.

Since you mentioned the middleware, could having the next.js app served by an Express server via the '*' last route cause the same issue ?

For those still having the issue, can you 👍🏽 if you have an express server and 👎🏽 if you haven't ?

@JannikZed
Copy link

@c100k so I have to say, that it got solved for me. In my case, Google was also not saying a reason for the could not fetch. But it was obviously, that my domain was too fresh. After some time and adding one high-value backlink it just went green.

Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2024
@samcx samcx removed the bug Issue was opened via the bug report template. label Jan 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests