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
Describe the bug I have this in my sitemap.xml (when using robotsTxtOptions.additionalSitemaps):
robotsTxtOptions.additionalSitemaps
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>https://www.domain.com/sitemap-0.xml</loc> </sitemap> <sitemap> <loc>https://www.domain.com/server-sitemap-index.xml</loc> </sitemap> <sitemap> </sitemapindex>
When I want this:
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>https://www.domain.com/sitemap-0.xml</loc> </sitemap> </sitemapindex>
To Reproduce
create server-sitemap-index.xml/route.ts to generate server-sitemap
next-sitemap.config.js:
/** @type {import('next-sitemap').IConfig} */ const siteUrl = process.env.NEXT_PUBLIC_SITE_URL module.exports = { siteUrl: siteUrl, sitemapSize: 50000, generateRobotsTxt: true, exclude: ['/server-sitemap-index.xml', '/sitemap/*'], robotsTxtOptions: { additionalSitemaps: [ `${siteUrl}/server-sitemap-index.xml`, ], }, transform: async (config, path) => { return { loc: path, } } }
But robots.txt should include the server-sitemap-index.xml:
# * User-agent: * Allow: / # Host Host: https://www.domain.com # Sitemaps Sitemap: https://www.domain.com/sitemap.xml Sitemap: https://www.domain.com/server-sitemap-index.xml
Expected behavior robotsTxtOptions.additionalSitemaps shouldn't add the sitemap to sitemap.xml BUT only to robots.txt
sitemap.xml
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
I have this in my sitemap.xml (when using
robotsTxtOptions.additionalSitemaps
):When I want this:
To Reproduce
create server-sitemap-index.xml/route.ts to generate server-sitemap
next-sitemap.config.js:
But robots.txt should include the server-sitemap-index.xml:
Expected behavior
robotsTxtOptions.additionalSitemaps
shouldn't add the sitemap tositemap.xml
BUT only to robots.txtScreenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: