Manual:Short URL/Prevent bots from crawling index.php

Prevent bots from crawling index.php
You can make sure that search engines only index actual wiki pages, without indexing action views (such as edit or history pages, with URLs in the form ). Note that doing this without implementing short URLs will block all pages from being indexed.

Create a file named robots.txt in the root of your MediaWiki installation with the following content. User-agent: * Disallow: /index.php