title: Node JS Express robots.txt disallows only /search but Google Search Console reports "indexed, though blocked by robots.txt" for other URLs
body: <p>I'm currently working on an application built with Express. I have tried to implement <code>robots.txt</code>.</p>
  <p>This is what I have right now:</p>
  <pre><code>app.use(
      '/robots.txt', 
      function (req, res) {
          res.type('text/plain');
          res.send(&quot;User-agent: *\nAllow: /\nDisallow: /search&quot;)
       );
   });
  </code></pre>
  <p>While I am able to see the results in the website, google search is giving me  the warning:</p>
  <blockquote>
  <p>Indexed, though blocked by robots.txt</p>
  </blockquote>
  <p>Am I doing something wrong or is there a better way to implement the <code>robots.txt</code> file?</p>