Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

221
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda