We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66e9a46 commit 2752eedCopy full SHA for 2752eed
public/robots.txt
src/app/robots.txt/route.ts
@@ -0,0 +1,26 @@
1
+export async function GET(request: Request) {
2
+
3
+ let robotsTxt = `#
4
+# robots.txt - not running on www yet, so don't index anything
5
+#
6
+User-agent: *
7
+Disallow: /
8
+`;
9
10
+ if (request.headers.get("Host") === "www.regexplanet.com") {
11
+ robotsTxt = `#
12
+# almost empty: everything at RegexPlanet is indexable!
13
14
+Sitemap: https://www.regexplanet.com/sitemap.xml
15
16
17
+Disallow: /honeypot.txt
18
+`
19
+ }
20
21
+ return new Response(robotsTxt, {
22
+ headers: {
23
+ "Content-Type": "text/plain; charset=utf-8",
24
+ },
25
+ });
26
+}
0 commit comments