Skip to content

Commit 4cdbb58

Browse files
committed
improvement(seo): restore explicit AI/search bot allow-list and add link-preview rules (#4480)
* improvement(seo): restore explicit AI/search bot allow-list and add link-preview rules * fix(seo): correct xAI UA strings, drop Bravebot, block /playground/ and /w/ from link-preview bots * fix(seo): drop unverified Grok UAs, correct DeepSeekBot and ImagesiftBot tokens * fix(seo): re-add Bravebot to allow-list per Brave Search docs * improvement(seo): drop redundant named AI/search bot allow-list * chore(seo): trim verbose comments in robots.ts
1 parent 93d1b7d commit 4cdbb58

1 file changed

Lines changed: 46 additions & 16 deletions

File tree

apps/sim/app/robots.ts

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,59 @@
11
import type { MetadataRoute } from 'next'
22
import { getBaseUrl } from '@/lib/core/utils/urls'
33

4+
const DISALLOWED_PATHS = [
5+
'/api/',
6+
'/workspace/',
7+
'/chat/',
8+
'/playground/',
9+
'/resume/',
10+
'/invite/',
11+
'/unsubscribe/',
12+
'/w/',
13+
'/form/',
14+
'/credential-account/',
15+
'/_next/',
16+
'/private/',
17+
'/blog*tag=',
18+
]
19+
20+
/** Looser disallow than the wildcard so OG previews can fetch /chat/ and /form/. */
21+
const LINK_PREVIEW_DISALLOWED_PATHS = [
22+
'/api/',
23+
'/workspace/',
24+
'/w/',
25+
'/playground/',
26+
'/resume/',
27+
'/invite/',
28+
'/unsubscribe/',
29+
'/credential-account/',
30+
'/_next/',
31+
'/private/',
32+
]
33+
34+
const LINK_PREVIEW_BOTS = [
35+
'Twitterbot',
36+
'LinkedInBot',
37+
'Slackbot',
38+
'Slack-ImgProxy',
39+
'Discordbot',
40+
'TelegramBot',
41+
'WhatsApp',
42+
'facebookexternalhit',
43+
'Pinterestbot',
44+
'redditbot',
45+
]
46+
447
export default function robots(): MetadataRoute.Robots {
548
const baseUrl = getBaseUrl()
649

750
return {
851
rules: [
52+
{ userAgent: '*', allow: '/', disallow: DISALLOWED_PATHS },
953
{
10-
userAgent: '*',
54+
userAgent: LINK_PREVIEW_BOTS,
1155
allow: '/',
12-
disallow: [
13-
'/api/',
14-
'/workspace/',
15-
'/chat/',
16-
'/playground/',
17-
'/resume/',
18-
'/invite/',
19-
'/unsubscribe/',
20-
'/w/',
21-
'/form/',
22-
'/credential-account/',
23-
'/_next/',
24-
'/private/',
25-
'/blog*tag=',
26-
],
56+
disallow: LINK_PREVIEW_DISALLOWED_PATHS,
2757
},
2858
],
2959
sitemap: [`${baseUrl}/sitemap.xml`, `${baseUrl}/blog/sitemap-images.xml`],

0 commit comments

Comments
 (0)