diff --git a/next.config.mjs b/next.config.mjs index 24902b1..d8727d0 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -26,6 +26,34 @@ const nextConfig = { }, ], }, + async headers() { + return [ + { + source: "/dashboard/:path*", + headers: [{ key: "X-Robots-Tag", value: "noindex, nofollow" }], + }, + { + source: "/plugins/:slug/edit", + headers: [{ key: "X-Robots-Tag", value: "noindex, nofollow" }], + }, + { + source: "/shield.dl.total/:slug", + headers: [{ key: "X-Robots-Tag", value: "noindex, nofollow" }], + }, + { + source: "/shield.rating/:slug", + headers: [{ key: "X-Robots-Tag", value: "noindex, nofollow" }], + }, + { + source: "/shield.state/:slug", + headers: [{ key: "X-Robots-Tag", value: "noindex, nofollow" }], + }, + { + source: "/shield.version/:slug", + headers: [{ key: "X-Robots-Tag", value: "noindex, nofollow" }], + }, + ]; + }, async rewrites() { const apiUrl = process.env.NEXT_PUBLIC_API_URL || "http://localhost:4000"; return [ diff --git a/src/app/builds/page.tsx b/src/app/builds/page.tsx index 44dcb8c..7b83108 100644 --- a/src/app/builds/page.tsx +++ b/src/app/builds/page.tsx @@ -4,6 +4,9 @@ import type { Metadata } from "next"; export const metadata: Metadata = { title: "Live Builds - EndGit", description: "View recent plugin builds across the Endstone ecosystem.", + alternates: { + canonical: "/builds", + }, }; async function getTodayBuilds() { diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 4615eb7..84dd833 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -25,9 +25,6 @@ export const metadata: Metadata = { "endgit", ], metadataBase: new URL("https://endgit.dev"), - alternates: { - canonical: "/", - }, openGraph: { title: "endgit — endstone plugin marketplace", description: diff --git a/src/app/robots.ts b/src/app/robots.ts index b5e8bb0..7ce002c 100644 --- a/src/app/robots.ts +++ b/src/app/robots.ts @@ -7,7 +7,7 @@ export default function robots(): MetadataRoute.Robots { rules: { userAgent: "*", allow: "/", - disallow: ["/dashboard/", "/admin/", "/auth/", "/api/"], + disallow: ["/admin/", "/auth/", "/api/"], }, sitemap: `${baseUrl}/sitemap.xml`, }; diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts index 13dff87..598935c 100644 --- a/src/app/sitemap.ts +++ b/src/app/sitemap.ts @@ -40,6 +40,12 @@ export default async function sitemap(): Promise { changeFrequency: "daily", priority: 0.9, }, + { + url: `${baseUrl}/builds`, + lastModified: new Date(), + changeFrequency: "daily", + priority: 0.6, + }, ...pluginEntries, ]; }