Skip to content

Commit e14f5d9

Browse files
committed
feat(robots): add robots.ts
1 parent 38bf3b9 commit e14f5d9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/robots.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type {MetadataRoute} from 'next'
2+
3+
export default function robots(): MetadataRoute.Robots {
4+
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://yoursite.com'
5+
return {
6+
rules: {
7+
userAgent: '*',
8+
allow: '/',
9+
disallow: '/private/',
10+
},
11+
sitemap: `${baseUrl}/sitemap.xml`,
12+
}
13+
}

0 commit comments

Comments
 (0)