SiliconMachine
SiliconMachine

Reputation: 606

Disallow dynamic URLs with @nuxtjs/robots module

I have the following folder structure:

/pages/user/_user

And my current robots object in nuxt.config

robots: {
 UserAgent: '*',
 Disallow: '/user',
 Sitemap: 
 'https://www.misite.com/sitemap.xml'
},

I haven't found anything related in the module's docummentation so I was wondering how can I disallow the /_user URL?

Upvotes: 0

Views: 736

Answers (1)

emirowski
emirowski

Reputation: 285

Not sure if it's possible with robots module but don't forget you can add noindex tag to users pages.

<script>
export default {
  head () {
    return {
      meta: [
        { hid: 'robots', name: 'robots', content: 'noindex' }
      ]
    }
  }
}
</script>

Upvotes: 3

Related Questions