commerce/app/robots.ts
2023-04-23 12:09:18 -07:00

15 lines
304 B
TypeScript

const baseUrl = process.env.NEXT_PUBLIC_VERCEL_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: 'http://localhost:3000';
export default function robots() {
return {
rules: [
{
userAgent: '*',
},
],
sitemap: `${baseUrl}/sitemap.xml`,
host: baseUrl,
};
}