nuxt-seo icon indicating copy to clipboard operation
nuxt-seo copied to clipboard

help:

Open Ischafak opened this issue 4 months ago • 2 comments

📚 What are you trying to do?

i was using like this before

robots: {
   ...(process.env.NUXT_PUBLIC_APP_NODE_ENV === 'production'
     ? {
         configPath: './robots/robots.config.ts',
       }
     : {
       groups: [
           {
             UserAgent: '*',
             Disallow: '/',
           },
         ],
       }),
 },

but after version change i am so lost. if anyone know what can i please help me.

🔍 What have you tried?

No response

ℹ️ Additional context

No response

Ischafak avatar Aug 08 '25 11:08 Ischafak

NUXT_SITE_ENV=staging i guess this was what i needed.

question 2: normally i was using configpath="./robots/robots.config.ts"

like this. and configpath is gone now.

should i just create _robots.txt and write the things into that?

Ischafak avatar Aug 08 '25 11:08 Ischafak

Hi, either use _robots.txt if you don't need runtime control or use one of the nitro hooks.

The module automatically disables non-production sites from being indexed as you've seen.

harlan-zw avatar Aug 08 '25 13:08 harlan-zw