Topic on Project:Support desk

How to disable search engines to index api.php pages?

5
Summary by Ciencia Al Poder
Fokebox (talkcontribs)

After updating Mediawiki to 1.22.13 I noticed that search engines indexed and put some pages to search results that not should be done. Pages looks like:

api.php?action=parse&summary=Some+[[link]]&prop=
api.php?action=query&list=alllinks&alunique=&alfrom=B

So how can I disallow google and other search machines to stop indexing all api.php pages (there are thousand such api.php alike pages)?

88.130.67.200 (talkcontribs)

You can prevent indexing by disallowing api.php in your robots.txt file.

Ciencia Al Poder (talkcontribs)

And the api documentation page should also output a <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">, which is a bug

193.200.211.146 (talkcontribs)

Like this?

User-agent: *
Disallow: /api.php
Reply to "How to disable search engines to index api.php pages?"