The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
import { MetadataRoute } from "next";
import { headers } from "next/headers";
export default async function robots(): Promise<MetadataRoute.Robots> {
const headersList = await headers();
let domain = headersList.get("host") as string;
return {
rules: [
{
userAgent: "*",
allow: "/",
},
],
sitemap: `https://${domain}/sitemap.xml`,
};
}