user19448827
user19448827

Reputation: 245

Next 14 App router - base sitemap 404 not found

Just have a basic app/sitemap.ts defined:

  return [
    {
      url: "https://acme.com",
      lastModified: new Date(),
      changeFrequency: "yearly",
      priority: 1,
    },
    {
      url: "https://acme.com/about",
      lastModified: new Date(),
      changeFrequency: "monthly",
      priority: 0.8,
    },
    {
      url: "https://acme.com/blog",
      lastModified: new Date(),
      changeFrequency: "weekly",
      priority: 0.5,
    },
  ];
}

When I do npm run dev - neither of the following URLs are found: -http://localhost:3000/sitemap.xml -http://localhost:3000/sitemap.xml/0.1

I just get redirected to the not found page.

This is next 14.2.3

Upvotes: 0

Views: 120

Answers (0)

Related Questions