Stop bots from crawling old links with extensions

Posted by Jared on Pro Webmasters See other posts from Pro Webmasters or by Jared
Published on 2012-03-31T18:05:44Z Indexed on 2012/04/01 5:39 UTC
Read the original article Hit count: 391

I've recently switched to MVC3 which is extension-less for the URL's, but Google and Bing have a wealth of links that they are crawling which no longer exist.

So I'm trying to find out if there is a way to format robots.txt (or by some other method) to tell google/bing that any link that ends in an extension isn't a valid link... Is this possible?

On pages that I'm concerned about a User having saved as a fav I'm displaying a 404 page that lists the links to take once they are redirected to the new page (I decided to not just redirect them as I don't want to maintain these forever). For Google/Bing sake I do have the canonical tag in the header.

User-agent: *
Allow: /
Disallow: /*.*

EDIT: I just added the 3rd line (in text above) and it APPEARS to do what I'm wanting. Allow a path, but disallow a file. Can anyone confirm this?

© Pro Webmasters or respective owner

Related posts about robots.txt

Related posts about robots