Technical SEO · · 1 min read
Programmatic Technical SEO: Internal Links & Sitemaps at Scale
Designing automated internal-linking pipelines, 404/410-aware sitemaps, and Schema.org entity graphs for large Next.js + headless CMS sites.
Zayne Lovecraft
Software Engineer III

When a publication grows past a few thousand URLs, nobody can hold the whole site graph in their head. New articles launch as orphans with no inbound links, and older high-authority pages point at redirects or retired URLs.
Treat internal linking as an indexing problem
Instead of asking editors to remember every related article, make linking a pipeline:
- On publish or update: index the article's topics, entities, and canonical slug, then suggest contextual links in both directions.
- On retirement (404 or 410): prune dead outbound anchors and forward link equity to the best replacement.
- At the transform layer: normalize CMS body links from root-relative paths to absolute canonical URLs.
Every automated change should be reversible. A rollback step is what makes it safe to run this on a live editorial catalog.
Sitemap hygiene
One of the fastest ways to waste crawl budget is a sitemap full of redirected or 410 Gone URLs. Only emit live, canonical, indexable records, and tie lastModified to real content changes.
// src/app/sitemap.ts
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const articles = await getIndexableArticles(); // excludes 404, 410, and redirects
return articles.map((post) => ({
url: `https://www.example.com/articles/${post.slug}`,
lastModified: new Date(post.updatedAt ?? post.publishedAt),
}));
}
Entity clarity for search and AI answer engines
Search engines and LLM-backed answer engines rely on unambiguous entities. Declare the right @type on each page (Person, WebSite, Article, BreadcrumbList), link profiles through sameAs, and keep self-referencing canonicals consistent with your sitemap.
- SEO
- Next.js
- Headless WordPress
- JSON-LD
Keep reading

AI · · 7 min read
Top 10 AI Tools to Build With Today (and How to Use Them)
The 10 AI tools I actually build with, from Cursor and Claude to the AI SDK, Vercel Workflow, and MCP, and how they fit into real automation pipelines.

Technical SEO · · 2 min read
Generative Engine Optimization (GEO) & CWV Gates in Next.js
How to audit Next.js apps for AI search citations (JSON-LD entity graphs, llms.txt, bot rules) and enforce Core Web Vitals client bundle budgets in CI.