Skip to content

Commit 133ccb2

Browse files
committed
Add robots.txt handler to disallow all web crawlers
1 parent 7295346 commit 133ccb2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

app/robots.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { NextResponse } from 'next/server';
2+
3+
export async function GET() {
4+
const content = `
5+
User-agent: *
6+
Disallow: /
7+
`;
8+
9+
return new NextResponse(content, {
10+
headers: {
11+
'Content-Type': 'text/plain',
12+
},
13+
});
14+
}

0 commit comments

Comments
 (0)