diff --git a/robots.txt b/robots.txt deleted file mode 100644 index 4dcbce09..00000000 --- a/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# robots.txt keep it only during development -User-agent: * -Disallow: diff --git a/src/public/robots-dev.txt b/src/public/robots-dev.txt new file mode 100644 index 00000000..77470cb3 --- /dev/null +++ b/src/public/robots-dev.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file diff --git a/src/public/robots-prod.txt b/src/public/robots-prod.txt new file mode 100644 index 00000000..14267e90 --- /dev/null +++ b/src/public/robots-prod.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / \ No newline at end of file diff --git a/vercel.json b/vercel.json index 7e41ffe7..d750b118 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,15 @@ { "cleanUrls": true, "redirects": [ + { + "source": "/robots.txt", + "destination": "/robots-prod.txt", + "has": [{ "type": "host", "value": "docs.iex.ec" }] + }, + { + "source": "/robots.txt", + "destination": "/robots-dev.txt" + }, { "source": "/tools/:path*", "destination": "/",