Skip to content

Fix robots sitemap url & improve robots NO_INDEX handling #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
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
8 changes: 3 additions & 5 deletions src/app/robots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { NO_INDEX } from '@/lib/utils/flags'

export default function robots(): MetadataRoute.Robots {
if (NO_INDEX) {
// We serve an empty robots.txt for a 200 status code
return {
rules: {
userAgent: '*',
disallow: '/',
},
rules: {},
}
}

Expand All @@ -16,6 +14,6 @@ export default function robots(): MetadataRoute.Robots {
userAgent: '*',
allow: '/',
},
sitemap: `${process.env.NEXT_PUBLIC_SUPABASE_URL}/sitemap.xml`,
sitemap: `https://e2b.dev/sitemap.xml`,
}
}