Sitmap.xml with dynamic routes #71217
Unanswered
soniktrooth
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a dynamic route at the root of my app plus a couple of explicit pages. The pages take precedence over the dynamic route as expected. Specific files that exist in my root (e.g. favicon.ico, opengraph-image.png) are also not sent to the dynamic route—also as expected. However, I am using
next-sitemapto generate my sitemap and for some reason when I visit sitemap.xml I am being sent to the dynamic route and therefore erroring because my dynamic route doesn't handle that in it's generateStaticParams().Do I need to perhaps explicitly tell Next to ignore xml files or something? If so, how?
Beta Was this translation helpful? Give feedback.
All reactions