Skip to main content
Next.js 16SitemapGoogle Search ConsoleSEOTypeScript

Dynamic Sitemap Generation in Next.js: How OpenMyPro Indexes 1,000+ Pages

How OpenMyPro generates dynamic XML sitemaps in Next.js for 1,000+ provider pages, blog posts, and content pages. Implementation patterns, priority configuration, and indexing strategy.

Pablo Diaz·Founder & CEO, Blossend Inc·Ex-Amazon AWS Engineer

See this stack in production. 150K+ users. six-figure ARR.

Free forever. Upgrade only when you're ready.

150K+ users · Ex-Amazon Engineer · Healthcare Innovation

No card charged today · 150K+ users · $0 to start

A sitemap is the roadmap you hand to Google. Without it, search engines are guessing which pages exist and which ones matter. OpenMyPro generates dynamic XML sitemaps for 1,000+ pages, and here is exactly how we implement sitemap generation in Next.js to ensure every provider page, blog post, and content page gets indexed.

Next.js Sitemap Route

Next.js supports sitemap generation through a special sitemap.ts file in the app directory. This file exports a default function that returns an array of sitemap entries, each with a URL, last modified date, change frequency, and priority. Next.js automatically serves this at /sitemap.xml with the correct Content-Type header.

For OpenMyPro, our sitemap includes static marketing pages, dynamically generated provider profile pages, blog posts, case studies, tech stack articles, and founder insights. Each category has its own URL generation logic but follows the same MetadataRoute.Sitemap return type.

Priority and Frequency Strategy

Not all pages are equal in search engine importance. We assign priority values based on business value: the homepage gets 1.0, provider search pages get 0.9, individual provider profiles get 0.8, blog posts get 0.7, and supporting pages like privacy and terms get 0.3.

Change frequency signals how often Google should recrawl. Provider profiles change weekly as availability updates, so they get "weekly." Blog posts rarely change after publication, so they get "monthly." The homepage content rotates with featured providers and gets "daily." These signals help Google allocate its crawl budget efficiently across our 1,000+ pages.

Dynamic Page Generation

The sitemap function dynamically pulls data from our content sources and database to generate URLs. For content pages, it includes blog posts, case studies, tech stack articles, and founder insights. For provider pages, it queries Supabase for all active provider slugs. This means every new provider page or blog post automatically appears in the sitemap on the next build.

The last modified date for each page comes from either the data record's publish date or the provider's profile update timestamp. Google uses this date to decide whether to recrawl a page, so accurate dates prevent unnecessary crawling of unchanged pages while ensuring updated pages get reindexed quickly.

Sitemap Index for Scale

When a site has more than 50,000 URLs, the XML sitemap specification requires splitting into multiple sitemaps referenced by a sitemap index. While OpenMyPro is not there yet, our architecture supports it. We can split the sitemap function into separate files — sitemap/providers.ts, sitemap/blog.ts — each generating a subset of URLs. Next.js handles the sitemap index automatically.

Google Search Console Integration

After deploying the sitemap, we submit it to Google Search Console for immediate processing. Search Console shows which pages are indexed, which have errors, and which are excluded. We monitor this weekly to catch indexing issues — a page showing as "Discovered but not indexed" signals a content quality problem that needs investigation.

Our indexing rate is over 95%, meaning nearly every page we generate gets indexed by Google within a week. The remaining 5% are typically pages with thin content or duplicate issues that we address in content updates.

Robots.txt Configuration

The sitemap URL is referenced in our robots.txt file, which also lives as a Next.js route handler. The robots file allows all crawlers, disallows internal tool routes, and points to the sitemap for page discovery. This standard SEO configuration ensures search engines find and respect our sitemap.

Performance Impact

Generating the sitemap is a build-time operation with zero runtime cost. Since our content pages are statically generated, the sitemap is also static — a pre-built XML file served from CDN. Google crawlers requesting /sitemap.xml get an instant response without invoking any server function.

Frequently Asked Questions

How do you generate a dynamic sitemap in Next.js?

Create a sitemap.ts file in the app directory that exports a default function returning MetadataRoute.Sitemap — an array of URL entries with url, lastModified, changeFrequency, and priority fields. Next.js serves this at /sitemap.xml automatically with correct headers.

What priority values should you use in a sitemap?

Assign based on business value: homepage 1.0, core product pages 0.9, content pages 0.7-0.8, supporting pages 0.3. Change frequency should reflect actual update cadence: daily for frequently updated pages, weekly for provider profiles, monthly for blog posts.

How does OpenMyPro ensure all pages get indexed by Google?

Dynamic sitemap generation includes every provider page, blog post, and content page automatically. Submission to Google Search Console triggers immediate processing. Over 95% of pages get indexed within a week. Weekly monitoring catches and resolves any indexing issues.

Ready to find the right AI tool? Our AI matching finds it in 33 seconds.

150K+ users. 190+ providers. Book healthcare in 33 seconds — not 26 days.

150K+ users · Ex-Amazon Engineer · Healthcare Innovation

No card charged today · AI-powered matching · 33-second booking

Get Founder Insights Weekly

Startup lessons, technical deep dives, and behind-the-scenes of building a 14-platform ecosystem. No spam.

Join 150K+ people who found their provider. Start free today.

150K+ users. 190+ providers. Book healthcare in 33 seconds — not 26 days.

150K+ users · Ex-Amazon Engineer · Healthcare Innovation

No card charged today · Cancel anytime · strong LTV/CAC

OpenMyPro connects you with healthcare providers for instant appointments. Try it free →

Build your professional portfolio

Free to get started. No card charged today.

Get Started

Tools We Recommend

Find healthcare providers

AI-powered matching. Book a provider in 33 seconds.

Try OpenMyPro

Discover trending brands

Product Hunt-style brand discovery with AI insights.

Explore Brands

AI-Powered Healthcare Tech

The parent company behind OpenMyPro and the Blossend ecosystem.

Learn More

Ready to work together? Get in touch or explore our platforms.

More tools by the same team

Find Healthcare Providers Instantly

AI-powered matching. Book a therapist, trainer, or nutritionist in 33 seconds.

Try OpenMyPro Free

Work With Me

Get updates on new projects, tools, and tech insights.

No spam. Unsubscribe anytime.

Visit Blossend.com →

Explore the full portfolio of independent AI tools and editorial properties at blossend.com.