Stop google indexing resource routes with Laravel
<p>I have just launched a link curation website that uses a controller to redirect the users to a link.</p>

<p>I have a route set up:</p>

<pre><code>Route::get('/redirect/{id}', 'LinksTableController@show');
</code></pre>

<p>This takes the ID of a link row from the database and redirects the user to that url.</p>

<p>The issue is that I can see google is indexing all of these routes. If I do site:domain.com it shows me all of my links in the database with url's such as:</p>

<pre><code>/redirect/10
/redirect/20
</code></pre>

<p>And so on.</p>

<p>I have a robot.txt file:</p>

<pre><code>User-agent: *
Disallow: /redirect/*
Disallow: /admin*
</code></pre>

<p>But want to make sure I have it set up correctly before I flood google.</p>