netlify-plugin-sitemap
netlify-plugin-sitemap copied to clipboard
Plugin adds unwanted "server/page" paths to sitemap for next js app
Describe the bug
Generated sitemap.xml has server path in page location for nextjs application.
To Reproduce
Steps to reproduce the behaviour:
- Install plugin in netlify app via the plugin installer on netlify dashboard
- Visit https://site.com/sitemap.xml
Expected behaviour
Rather than https://site.com/server/pages/signup, it should generate <loc>
as https://site.com/signup
Happening for me as well. Our SEO team picked up on the sitemap.xml output and just recently sent the issue my way. Ugh I hope this is fixed soon!
This is happening to me as well, and I can't exclude it for some reason.
I am also getting pages like /server/pages/500
in my sitemap
This worked for me on our next.js app:
netlify.toml
[[plugins]]
package = "@netlify/plugin-sitemap"
[plugins.inputs]
exclude = [
'./.next/server/**',
]
I ended up using https://github.com/iamvishnusankar/next-sitemap instead of the netlify plugin and it works much better
This has also started happening to out site.