<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cloveode Technologies</title>
    <description>The latest articles on DEV Community by Cloveode Technologies (@cloveode_technologies_e77).</description>
    <link>https://dev.to/cloveode_technologies_e77</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4255222%2F924a8e05-71b5-452c-8472-7bb95fd759f8.jpg</url>
      <title>DEV Community: Cloveode Technologies</title>
      <link>https://dev.to/cloveode_technologies_e77</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cloveode_technologies_e77"/>
    <language>en</language>
    <item>
      <title>How we made 78 jewelry products indexable by moving off hash routing to Next.js</title>
      <dc:creator>Cloveode Technologies</dc:creator>
      <pubDate>Fri, 20 Nov 2026 08:10:37 +0000</pubDate>
      <link>https://dev.to/cloveode_technologies_e77/how-we-made-78-jewelry-products-indexable-by-moving-off-hash-routing-to-nextjs-43om</link>
      <guid>https://dev.to/cloveode_technologies_e77/how-we-made-78-jewelry-products-indexable-by-moving-off-hash-routing-to-nextjs-43om</guid>
      <description>&lt;p&gt;A client came to us with a beautiful fine-jewelry storefront that had one fatal&lt;br&gt;
flaw for a business that lives on organic search: &lt;strong&gt;none of its products could&lt;br&gt;
rank on Google.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The site was an older single-page app that used hash routing. Every product&lt;br&gt;
lived at a URL like:&lt;/p&gt;

&lt;p&gt;/jewelry#product/210-104&lt;/p&gt;

&lt;p&gt;It looked fine to a human. To a search engine, it was a problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why hash URLs kill SEO
&lt;/h2&gt;

&lt;p&gt;Everything after the &lt;code&gt;#&lt;/code&gt; in a URL is a &lt;strong&gt;fragment&lt;/strong&gt; — it's handled entirely in&lt;br&gt;
the browser and is &lt;strong&gt;never sent to the server&lt;/strong&gt;. Googlebot sees one page&lt;br&gt;
(&lt;code&gt;/jewelry&lt;/code&gt;) and all 78 products collapse into it. There are no distinct,&lt;br&gt;
crawlable URLs to index, no per-product titles, no per-product metadata.&lt;/p&gt;

&lt;p&gt;So the catalogue was effectively invisible. The fix wasn't "more SEO plugins" —&lt;br&gt;
it was giving every product a &lt;strong&gt;real, server-rendered URL.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We rebuilt the storefront on &lt;strong&gt;Next.js (App Router)&lt;/strong&gt;. Here's the playbook we&lt;br&gt;
used, which applies to any catalog-style site stuck on client-side routing.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Give every product a static route
&lt;/h2&gt;

&lt;p&gt;With the App Router, a dynamic segment plus &lt;code&gt;generateStaticParams&lt;/code&gt; pre-renders a&lt;br&gt;
real HTML page for every product at build time:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
tsx
// app/jewelry/[category]/[slug]/page.tsx
import { getProducts, getProduct } from "@/lib/catalog";

export function generateStaticParams() {
  return getProducts().map((p) =&amp;gt; ({
    category: p.category,
    slug: p.slug,
  }));
}

export default async function ProductPage({ params }) {
  const { category, slug } = await params;
  const product = getProduct(category, slug);
  // ...render the product
}

Now /jewelry/rings/solitaire-210-104 is a genuine URL Google can crawl and
index — mirroring the store's real taxonomy (category → subcategory → product).

2. Unique metadata + a canonical tag per page

Each page needs its own title, description and canonical URL. generateMetadata
runs per route:

export async function generateMetadata({ params }) {
  const { category, slug } = await params;
  const product = getProduct(category, slug);

  return {
    title: `${product.name} | Davidas`,
    description: product.summary,
    alternates: { canonical: `/jewelry/${category}/${slug}` },
    openGraph: { title: product.name, images: [product.image] },
  };
}

The canonical tag matters more than people think: it tells Google this is the
one true URL for the content, which prevents duplicate-content dilution.

3. Add Product structured data (JSON-LD)

This is what unlocks rich results — price, availability and ratings right in the
search listing. Drop a JSON-LD script into the page:

export default async function ProductPage({ params }) {
  const product = getProduct(/* ... */);

  const jsonLd = {
    "@context": "https://schema.org",
    "@type": "Product",
    name: product.name,
    image: product.image,
    description: product.summary,
    offers: {
      "@type": "Offer",
      price: product.price,
      priceCurrency: "USD",
      availability: "https://schema.org/InStock",
    },
  };

  return (
    &amp;lt;&amp;gt;
      &amp;lt;script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
      /&amp;gt;
      {/* ...product UI */}
    &amp;lt;/&amp;gt;
  );
}

4. Auto-generate the sitemap

Don't hand-maintain a sitemap for a catalog that changes. Generate it from the
same data source:

// app/sitemap.ts
import { getProducts } from "@/lib/catalog";

export default function sitemap() {
  return getProducts().map((p) =&amp;gt; ({
    url: `https://example.com/jewelry/${p.category}/${p.slug}`,
    lastModified: p.updatedAt,
  }));
}

Next.js serves this at /sitemap.xml automatically. Submit it in Google Search
Console and let Google discover all 78 pages at once.

5. Preserve every legacy URL

The one step people skip — and then watch their rankings vanish. Any inbound
links or cached URLs from the old site must redirect, not 404. Map the old
patterns to the new ones:

// next.config.ts
async redirects() {
  return [
    { source: "/jewelry", destination: "/jewelry/all", permanent: true },
    // map legacy product ids → new slugs
  ];
}

A 301 passes the existing link equity to the new URL. Skipping this throws away
whatever authority the old pages had.

The result

The catalogue went from one indexable page to 78+, each with its own title,
canonical, structured data and a clean taxonomy URL — plus an auto-generated
sitemap and preserved legacy links so nothing was lost in the move. We also
ported the old PHP contact forms to serverless functions so the whole thing runs
without a legacy backend.

Takeaways

- Hash routing (#) and SEO don't mix — fragments never reach the server.
- Static routes via generateStaticParams give crawlers real pages.
- Per-page generateMetadata (title + canonical) is non-negotiable.
- JSON-LD Product schema unlocks rich results.
- Always 301 your old URLs or you lose your existing rankings.

---

We're Cloveode, a software studio that builds fast,
SEO-friendly websites, e-commerce stores and custom software. This was our
rebuild of the Davidas jewelry storefront.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>seo</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
