Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions app/robots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { MetadataRoute } from 'next'

const BASE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'https://hah.app'

export default function robots(): MetadataRoute.Robots {
return {
rules: [
{
userAgent: '*',
allow: '/',
disallow: ['/api/', '/dashboard/'],
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
},
{
userAgent: 'GPTBot',
disallow: '/',
},
{
userAgent: 'ChatGPT-User',
disallow: '/',
},
{
userAgent: 'CCBot',
disallow: '/',
},
{
userAgent: 'anthropic-ai',
disallow: '/',
},
{
userAgent: 'Google-Extended',
disallow: '/',
},
],
Comment thread
coderabbitai[bot] marked this conversation as resolved.
sitemap: `${BASE_URL}/sitemap.xml`,
}
}
32 changes: 32 additions & 0 deletions app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { MetadataRoute } from 'next'

const BASE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'https://hah.app'

export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: BASE_URL,
lastModified: new Date(),
changeFrequency: 'daily',
priority: 1,
},
{
url: `${BASE_URL}/auctions`,
lastModified: new Date(),
changeFrequency: 'hourly',
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
priority: 0.9,
},
{
url: `${BASE_URL}/create`,
lastModified: new Date(),
changeFrequency: 'weekly',
priority: 0.8,
},
{
url: `${BASE_URL}/dashboard`,
lastModified: new Date(),
changeFrequency: 'daily',
priority: 0.7,
},
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
]
}