SEO: robots on apex hostname, do not block JS or static assets needed for rendering
This commit is contained in:
parent
3bc66883c9
commit
a0863a3e20
1 changed files with 8 additions and 2 deletions
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue