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

218
Views
Node JS Express robots.txt disallows only /search but Google Search Console reports "indexed, though blocked by robots.txt" for other URLs

I'm currently working on an application built with Express. I have tried to implement robots.txt.

This is what I have right now:

app.use(
    '/robots.txt', 
    function (req, res) {
        res.type('text/plain');
        res.send("User-agent: *\nAllow: /\nDisallow: /search")
     );
 });

While I am able to see the results in the website, google search is giving me the warning:

Indexed, though blocked by robots.txt

Am I doing something wrong or is there a better way to implement the robots.txt file?

about 4 years ago · Juan Pablo Isaza
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!