Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/app/benchmarks/[slug]/[chain]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Metadata } from "next";
import { notFound, redirect } from "next/navigation";
import { notFound, permanentRedirect } from "next/navigation";
import Link from "next/link";
import { ArrowLeft, ArrowUpRight } from "lucide-react";
import { getBenchmark } from "@/data/benchmarks";
Expand Down Expand Up @@ -333,7 +333,10 @@ export default async function BenchmarkChainPage({
// and Ahrefs flags the lowercase variants as orphans (parent links use
// the YAML's uppercase value).
const canon = canonicalChainSlug(chain);
if (canon !== chain) redirect(`/benchmarks/${slug}/${canon}`);
// permanentRedirect emits a 308 so Google consolidates rank signal on
// the canonical lowercase URL. redirect() defaults to 307 (temporary)
// which leaves the source URL in the index competing with the canonical.
if (canon !== chain) permanentRedirect(`/benchmarks/${slug}/${canon}`);
const data = await loadChainPage(slug, chain);
if (!data) notFound();
const { benchmark, explainer } = data;
Expand Down
Loading