nuxt-modules / robots

Tame the robots crawling and indexing your Nuxt site.
https://nuxtseo.com/robots
MIT License
424 stars 34 forks source link

robots.txt 404 error #66

Closed aswinghosh-2hats closed 2 years ago

aswinghosh-2hats commented 2 years ago

I can access robots.txt in local environment but gives 404 error in server (vercel)

"devDependencies": {

"@nuxtjs/robots": "^2.5.0",
"nuxt": "^2.15.8",

}

domabbott92 commented 2 years ago

Same issue for me.

Works when running npm run dev and npm run build | npm run start locally, but neither work on the server. Also tested in development/production mode and, again, both work locally.

Server is nginx "@nuxtjs/robots": "^2.5.0", "nuxt": "2.15.8",

dargmuesli commented 2 years ago

Just to clarify, you are not using Nuxt bridge?

ThomasBerneSV commented 2 years ago

If he was using nuxt bridge, he would be using nuxt-edge and not nuxt library. He is using nuxt 2 without the bridge. image

ricardogobbosouza commented 2 years ago

Hi @aswinghosh-2hats

Its works https://nuxt-robots-example.vercel.app/robots.txt https://github.com/ricardogobbosouza/nuxt-robots-example

You configured vercel.json ? https://github.com/ricardogobbosouza/nuxt-robots-example/blob/main/vercel.json

Does the problem still persist?

WaldemarEnns commented 2 months ago

This issue still persists for me. Using latest robots version and Nuxt3.

Locally available, not in production -> results in 404 error.