diff --git a/src/routes/robots.txt/+server.ts b/src/routes/robots.txt/+server.ts new file mode 100644 index 0000000000..eecd8c2f2d --- /dev/null +++ b/src/routes/robots.txt/+server.ts @@ -0,0 +1,14 @@ +import type { RequestHandler } from "@sveltejs/kit"; + +const follow = `# robotstxt.org/ +User-agent: *`; + +const nofollow = `# robotstxt.org/ +User-agent: * +Disallow: /`; + +export const GET:RequestHandler = ({url}) => { + return new Response( + url.hostname === 'appwrite.io' ? follow : nofollow + ); +} \ No newline at end of file diff --git a/static/robots.txt b/static/robots.txt deleted file mode 100644 index ef9d9f6edd..0000000000 --- a/static/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# robotstxt.org/ - -User-agent: * \ No newline at end of file