Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
Nuxt.js robots.txt file Multiple disallow per user agent

Using Nuxts nuxt-robots module how do I configure multipe disallows per user agent. Currently I have :

  robots: () => {
    return {
      UserAgent: '*',
      Disallow: '/search/',

      Sitemap: (req) => `https://${req.headers.host}/sitemap.xml`,
    }
  },

but I need to output:

User-agent: *
Disallow: /search/
Disallow: /testimonials/

User-agent: MJ12bot
Disallow: /search/
Disallow: /testimonials
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you want several elements, you probably need to use an array.

Isn't something like this working?

robots: () => {
  return [
    {
      UserAgent: '*',
      Disallow: '/search/',
      Sitemap: (req) => `https://${req.headers.host}/sitemap.xml`,
    },
    {
      UserAgent: 'MJ12bot',
      Disallow: '/search/',
      Sitemap: (req) => `https://${req.headers.host}/sitemap.xml`,
    },
  ]
}

Like the array approach: https://github.com/fengsi-io/nuxt-robots#array

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!