Common Programmatic SEO Code Mistakes & Fixes
Google SGE and core spam updates have raised the quality threshold for programmatic web pages. Monotonous layouts built only to catch long-tail search queries are demoted. Below is a guide illustrating common technical and structure-level mistakes, followed by before-and-after code blocks showing how to implement compliant Next.js, React, and HTML templates.
Visual Code Comparisons
// apps/web/app/listing/[city]/page.tsx
// ❌ BAD: No canonical tag, generic descriptions, missing schema.org entities.
export default function CityPage({ params }: { params: { city: string } }) {
return (
<main>
<h1>Services in {params.city}</h1>
<p>Looking for services in {params.city}? We offer the best solutions...</p>
{/* 80% boilerplate page layout follows */}
</main>
);
}// apps/web/app/listing/[city]/page.tsx
// ✅ GOOD: Dynamic metadata, unique descriptions, self-referencing canonicals, nested JSON-LD schema.
import { Metadata } from "next";
export async function generateMetadata({ params }): Promise<Metadata> {
const canonical = `https://pseolint.dev/listing/${params.city}`;
return {
title: `Local Services in ${params.city} | Certified Providers`,
description: `Find top-rated local services in ${params.city}. Verified local provider listings, pricing estimates, and real user reviews.`,
alternates: { canonical }
};
}
export default function CityPage({ params }) {
const schema = {
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": `Certified Service Providers in ${params.city}`,
"description": `Top-rated verified provider listings in ${params.city}.`,
"address": { "@type": "PostalAddress", "addressLocality": params.city }
};
return (
<main>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
/>
<h1>Services in {params.city}</h1>
{/* Dynamic, dense, localized data tables and reviews */}
</main>
);
}Detailed Deficit Deep-Dive
1. The Entity-Swap Trap (Doorway Pages)
Critical ErrorCreating 10,000 pages where the only difference is a swapped city name or keyword token (e.g. 'Web development in Boston' vs 'Web development in Denver') is the easiest way to trigger a SpamBrain doorway-page penalty. Google expects genuine local entity details, address citations, or specialized data on each page.
2. Missing self-referential canonical tags
Major WarningIf you omit the canonical tag or mistakenly point all generated pages to the category root or homepage, Google will consolidate them. Googlebot will pick one representative URL, index it, and drop the remaining 99.9% of your pages under the 'Duplicate, Google chose different canonical' label.
3. High Boilerplate-to-Content Ratio
Major WarningIf 85% of your page's words live in the navigation bar, sidebars, related links, and the footer, what is left is not enough for Google to tell the URL apart from its siblings. There is no ranking requirement to hit here: Google documents no preferred word count. The 300-word figure pseolint uses is a spam-detection floor for pages generated in bulk, and below it a template is almost always shipping boilerplate with a swapped entity name.
4. No Machine-Readable Structured Data (Schema)
Optimization GapSearch engine AI Overviews rely heavily on structured entities to formulate citations. If your pages lack Product, Article/TechArticle, or BreadcrumbList JSON-LD, you are missing out on rich results and AI recommendations. FAQPage and HowTo are not on that list any more: Google retired the HowTo rich result in September 2023 and the FAQ rich result on May 7, 2026, so question and step content earns its citation through visible structure, one question or step per heading with the answer directly beneath it.
Sources
- Google Search Central: Spam policies: scaled content abuse: Google's March 5, 2024 scaled content policies define the boundaries of doorway-like templates and high-volume near-duplicate layouts.
- Google Search Central: Consolidate duplicate URLs (canonicalization): Google's canonicalization guidelines detail how crawler algorithms fold structurally similar URLs into a single representative index slot.
- Google Search Central: Creating helpful, reliable, people-first content: Helpful content frameworks establish the 300-word standalone body floor and information density metrics targeted in our guide.