SEO: robots on apex hostname, do not block JS or static assets needed for rendering

This commit is contained in:
Zac Gaetano 2026-05-04 00:01:40 -04:00
parent 3bc66883c9
commit a0863a3e20

View file

@ -1,14 +1,20 @@
import { MetadataRoute } from "next";
const SITE_URL = "https://wilddragon.net";
export default function robots(): MetadataRoute.Robots {
return {
rules: [
{
userAgent: "*",
allow: "/",
// Block any internal Next.js bookkeeping that shouldn't be indexed.
// Do NOT block /_next/static or /_next/image — Googlebot needs them
// to render the page when verifying mobile usability and Core Web Vitals.
disallow: ["/api/"],
},
],
sitemap: "https://www.wilddragon.net/sitemap.xml",
host: "https://www.wilddragon.net",
sitemap: `${SITE_URL}/sitemap.xml`,
host: SITE_URL,
};
}