Skip to content

Commit a07399f

Browse files
committed
fix: restore robots.txt identity rewrite to prevent SPA catch-all override
Without the identity rewrite, requests for robots.txt fall through to the catch-all rewrite and serve index.html instead of the static file, breaking SEO crawlability.
1 parent 1c02957 commit a07399f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

example/angular/vercel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const config: VercelConfig = {
1818
),
1919
],
2020
rewrites: [
21+
routes.rewrite('/robots.txt', '/robots.txt'),
2122
routes.rewrite('/favicon.ico', '/favicon.ico'),
2223
routes.rewrite('/(.*)', '/index.html'),
2324
],

0 commit comments

Comments
 (0)