Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update robots.ts

Steven Tey75116ba58288
diff --git a/apps/web/app/robots.ts b/apps/web/app/robots.ts
index d5571d24bb..79c5624c10 100644
--- a/apps/web/app/robots.ts
+++ b/apps/web/app/robots.ts
@@ -1,4 +1,4 @@
-import { SHORT_DOMAIN } from "@dub/utils";
+import { SHORT_DOMAIN, isDubDomain } from "@dub/utils";
import { MetadataRoute } from "next";
import { headers } from "next/headers";
@@ -11,6 +11,18 @@ export default function robots(): MetadataRoute.Robots {
domain = SHORT_DOMAIN;
}
+ if (isDubDomain(domain)) {
+ return {
+ rules: [
+ {
+ userAgent: "*",
+ allow: "/",
+ },
+ ],
+ sitemap: `https://${domain}/sitemap.xml`,
+ };
+ }
+
return {
rules: [
{