Menu

Next.js App Router SEO checklist: metadata, sitemap.ts, robots.ts, JSON-LD
📰

Next.js App Router SEO checklist: metadata, sitemap.ts, robots.ts, JSON-LD

DEV Community: nextjs·ENZORA·about 8 hours ago
#cpHLa5PB
#devtonextjs#devto#dev#sitemap#services
Reading 0:00
15s threshold

Search engines still reward boring technical hygiene. App Router makes the right things easier—central metadata, file-based sitemap and robots—but only if you wire them consistently across routes. This checklist reflects how we keep a multi-page agency site indexable on a single Vercel project ( enzora.vercel.app ), without buying SEO plugins or duplicate WordPress stacks.

1. One canonical host

Pick one HTTPS origin and use it everywhere: metadataBase , canonical tags, JSON-LD url fields, and sitemap.xml locs. We read NEXT_PUBLIC_SITE_URL with a default of https://enzora.vercel.app so previews can override without forked code.

Helper:

export const siteUrl = ( process . env . NEXT_PUBLIC_SITE_URL ?? " https://enzora.vercel.app " ). replace ( / \/ $/ , "" );

Enter fullscreen mode

Exit fullscreen mode

Every indexable route should export alternates.canonical as an absolute URL on that host, not a relative path alone. Relative canonicals break when content is scraped from staging.

2.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.