Support full sitemap spec in sitemap metadata route #48479
Replies: 7 comments 1 reply
-
On a slightly more critical note, I'd like to ask why these properties weren't added in the first place. It feels to me like the feature shouldn't have been released when support is still very limited. Making the sitemaps fully spec compliant also doesn't feel like a big thing to add, making me feel like the dev team just forgot to read the specification. Don't get me wrong, loving the feature, just wanted to mention my disappointment due to the lack of attention to detail. Of course, given there's no good reason to omit these properties from the (first) release. |
Beta Was this translation helpful? Give feedback.
-
I opened a PR for the addition of the attributes. Since it was a small change, I didn't wait for confirmation from the Next.js team to make it easy for them to just accept the PR instead of doing the whole discussion. I didn't add the URL escaping, because it could possibly result in backwards incompatible changes. |
Beta Was this translation helpful? Give feedback.
-
This is actually not the only missing part. There should for example also be a way to define alternative versions, see Google Search Central docs on that, although that's not standard. |
Beta Was this translation helpful? Give feedback.
-
Also missing: |
Beta Was this translation helpful? Give feedback.
-
I can't believe those pieces are missing. Sitemaps are a critical part of a website. This will effect us very badly. 😞 |
Beta Was this translation helpful? Give feedback.
-
how's it going on?..... |
Beta Was this translation helpful? Give feedback.
-
It is now supported from v13.4.5 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Let the sitemap metadata route allow adding all properties described by the specification.
Non-Goals
It is mentioned in the docs that multi sitemap files are WIP and will be added later, so I consider this out-of-scope for now, making this feature request low hanging fruit.
Background
Currently, only the
loc
andlastmod
properties of aurl
in the generated sitemap, generated by a sitemap metadata route (/app/sitemap.ts
) are supported. However, the spec also defineschangefreq
andpriority
as possible attributes.When using the sitemap metadata routes in a commercial project I was surprised to find these attributes not supported.
Proposal
Add the
priority
andchangefreq
attributes to the sitemap entries for the sitemap metadata routes.A possible additional feature could be the automatic escaping of URL's in the generated XML, also described by the spec.
Beta Was this translation helpful? Give feedback.
All reactions