question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Server-sitemap is not add to main sitemap

See original GitHub issue

Describe the bug When I generate the sitemap, the main/index sitemap doesn’t have the dynamic server sitemap.

To Reproduce Add a dynamic server sitemap and just run next-sitemap you will see that the dynamic sitemap is not listed on the main file.

Expected behavior All sitemaps references must be included on main sitemap.

Screenshots the main sitemap result example image

expected result image

Additional context my config from next-sitemap.js

module.exports = {
    siteUrl: process.env.NEXT_PUBLIC_URL,
    generateRobotsTxt: true,
    sitemapSize: 7000,
    exclude: [
        '/server-sitemap.xml',
        '/project/*',
        '/profile/*',
        '/discover',
        '/messages',
        '/notifications',
        '/onboarding',
        '/search',
        '/settings',
        '/theframe'
    ],
    robotsTxtOptions: {
        additionalSitemaps: [
            `${process.env.NEXT_PUBLIC_URL}/server-sitemap.xml`
        ],
    },
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
BrunoElocommented, May 20, 2022

Any update on this please?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic sitemap by next-sitemap - Stack Overflow
I want to add server-sitemap.xml to my next js App by next-sitemap, I will be grateful if anyone can explain how can i...
Read more >
Improving SEO with (Dynamic) Sitemaps in Next.js - YouTube
In this video we'll use the next- sitemap package to generate sitemap.xml and robots.txt for our Next.js app. We'll also generate a dynamic, ......
Read more >
GitHub - iamvishnusankar/next-sitemap
Here's a sample script to generate sitemaps on server side. Create pages/server-sitemap.xml/index.tsx page and add the following content. // pages/server- ...
Read more >
Generate Sitemap for Static and Dynamic Pages in a Next.js App
Here we are adding server-sitemap.xml where all the dynamic URLs are created. This will be explained in the next step. Note that the...
Read more >
Sitemap is not showing hostname on CD server
For populating sitemap we are using SXA. Same settings are working on CM server but not on CD server. Sitemap.xml show urls but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found