Your AI-built Next.js 16 landing page looks fine. Its link preview might not: 6 metadata traps and the prompts that fix them A developer documented six metadata traps that AI-generated Next.js 16 landing pages commonly ship with, including a localhost:3000 fallback leaking into production robots.txt, sitemaps and og:image tags without failing the build. The fixes include throwing an error in next.config.ts when VERCEL_ENV is production and NEXT_PUBLIC_SITE_URL is empty or points at localhost, and redeploying after any NEXT_PUBLIC_ variable change since those values are inlined at build time and static routes like robots.txt and sitemap.xml stay cached. An AI-built Next.js 16 landing page can look perfect in your browser while its link previews, robots.txt , and sitemap still point at localhost:3000 , lose their image on every subpage, or show up as a blank card. Here are six metadata traps, each checked on a real build, with a fix and a prompt you can paste into Cursor, Claude Code, or ChatGPT. The examples come from a waitlist landing page built prompt by prompt on create-next-app 16.4 Next.js 16.4, React 19.3, Tailwind v4 . None of these show up when you click around on localhost , which is why they slip through. You only notice when someone shares the link. localhost:3000 ends up in production Ask an assistant for a site config and you'll almost always get this line. Our own prompt asked for exactly this: url: process.env.NEXT PUBLIC SITE URL ?? "http://localhost:3000", That fallback is fine for local dev. The problem is that nothing complains when the variable is missing in production. We built the app without it and checked the output. robots.txt said Sitemap: http://localhost:3000/sitemap.xml , every