Skip to content

Commit

Permalink
fix: robots.txt prevent params page from being indexed
Browse files Browse the repository at this point in the history
  • Loading branch information
mwskwong authored Feb 5, 2025
1 parent 30ea5da commit eca3c42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/robots.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { type MetadataRoute } from "next";

import { siteUrl } from "@/constants/site-config";
import { routes, siteUrl } from "@/constants/site-config";

const robots = () =>
({
rules: {
userAgent: "*",
disallow: process.env.VERCEL_ENV === "production" ? "/params" : "/",
disallow: process.env.VERCEL_ENV === "production" ? routes.params.pathname : "/",
},
sitemap: `${siteUrl}/sitemap.xml`,
}) satisfies MetadataRoute.Robots;
Expand Down

0 comments on commit eca3c42

Please sign in to comment.