DEV Community

Cover image for How I built a Next.js app with 1,500+ localized routes and perfect Technical SEO πŸš€
hunterx13
hunterx13

Posted on

How I built a Next.js app with 1,500+ localized routes and perfect Technical SEO πŸš€

Building a micro-SaaS is only half the battle. Getting Google to care about it is the real challenge.

When I set out to build ProMetadataβ€”a suite of 14 tools to inject, extract, clean, and score image/PDF metadataβ€”I knew my growth strategy had to be 100% organic search. I didn't want to rely on paid ads. I needed an architecture that would allow me to scale globally from day one while maintaining perfect Core Web Vitals.

Here is a breakdown of the technical SEO architecture I built using Next.js to support 20 languages and over 1,500 static routes.

🌍 1. The Multilingual Architecture (20 Locales, Zero Layout Shift)

To capture global search volume, the app needed to be accessible in 20 different languages (from English and French to Japanese, Hindi, and Arabic).

  • Dynamic Middleware: I set up Next.js middleware to handle dynamic routing for all 20 locales seamlessly.
  • 100% SSG: Speed is a massive ranking factor. Every single localized route is statically generated (SSG).
  • Localized Metadata: It’s not just the UI that translates. The Title, Description, and OpenGraph tags are dynamically generated for the specific locale on the server before the page is served to the client.

πŸ—ΊοΈ 2. Taming a 1,500+ URL Sitemap

Managing a sitemap for a multi-language site with 14 distinct tools can get messy fast. I built an automated sitemap generator that outputs all 1,500+ localized URLs with strict rules:

  • Hreflang Integration: Alternates (hreflang) are embedded directly inside the sitemap.xml and the HTML head to ensure Google never penalizes for duplicate content across regions.
  • Strict Prioritization: The generator assigns intelligent priorities automatically (e.g., 1.0 for the Home page, 0.9 for Alternative pages, 0.8 for individual Tools).
  • Freshness Tags: Explicit lastmod and changefreq tags are applied to every entry to guide crawler budgets.

🧠 3. Heavy Structured Data (JSON-LD)

Google loves structured data. Instead of just adding a basic schema, I programmatically injected specific JSON-LD schemas across all 14 tool pages:

  • SoftwareApplication Schema: Applied globally across all tool pages to define exactly what the application does to search engines.
  • FAQ & HowTo Schemas: Automatically injected into the tools. If someone searches "How to batch rename EXIF data" or "How to inject SEO metadata," Google can pull the exact steps from my HowTo schema directly into a rich snippet.

πŸ₯Š 4. Programmatic Competitor Targeting

To capture bottom-of-the-funnel traffic, I built dedicated comparison pages (like /metadata2go-alternative).

From a technical standpoint, this page is highly optimized with targeted URL paths, specialized metadata, and comparison grids that highlight features competitors lack, such as:

  • Bulk SEO optimization
  • Webhook integrations
  • Full metadata injection (not just extraction)

⚑ 5. Resource Optimization

You can have the best metadata in the world, but if your site takes 4 seconds to load, you're dead in the water.

  • Strict Canonicals: Implemented across all localized paths to consolidate link equity and prevent keyword cannibalization.
  • Asset Naming: Even the site logo is optimized (prometadata-metadata-tool-logo.png) with programmatic alt text across all components.
  • Web Vitals: By relying heavily on Next.js standard image optimization, system fonts, and static generation, the Lighthouse scores stay pinned in the green.

The Takeaway

Building this level of technical SEO into the foundation of a Next.js app takes a lot of upfront work, but the compound interest of organic traffic is worth it.

If you are building a tool right now, don't wait until after launch to think about your URL structure, hreflang tags, and schemas. Build them into your components from day one.

You can check out the live architecture and try the tools for free here: ProMetadata

How are other devs handling massive localized sitemaps in Next.js App Router? Let me know in the comments! πŸ‘‡

Top comments (0)