|This page in a nutshell: A double redirect is a redirect to another redirect. The Mediawiki software won't follow these redirects. Double redirects are easily fixed by bots and human editors should devote their efforts elsewhere. However, an editor should not leave behind the double redirects that he created himself.|
|Special pages||Other versions|
|Dead-end pages||Dead-end pages|
|Dormant pages||Dusty articles|
|Lonely pages||Orphaned articles|
|New pages||New pages feed|
|Uncategorized templates||Uncategorized templates|
|Unused files (images)||...|
|Without interwiki links||...|
|Most interwiki links||...|
|See also: Maintenance Reports|
A redirect is a page that automatically causes the text of another page to be displayed in its place. A redirect that points to another redirect is called a double redirect. These pages are unwanted, because Wikipedia's MediaWiki software is currently configured to not follow the second redirect. The MediaWiki feature, which will allow it, is not mature yet. If someone is redirected to a redirect, the chain stops after the first redirect, like in the example. These situations create slow, unpleasant experiences for the reader, waste server resources, and make the navigational structure of the site confusing.
Double redirects are usually created after a page move when old redirects are left unchanged and pointing towards an old name. Although bots fix most of these within a few days from creation automatically, an editor should not leave behind the double redirects that he created himself.
How to fix a double redirect
- Suppose page title A (Morchella esculenta in the example to the right) redirects to B (Morel) which in turn redirects to C (Morchella).
- Upon following the link to A, you will see, as illustrated, a page containing:
- (a) the page title B;
- (b) a large link to C;
- (c) a small notice saying "Redirected from A"
- Click the "A" in "redirected from A".
- You will see a page containing:
- (a) the page title A;
- (b) a large link to B.
- Click "Edit this page" and change B to C.
Discussion on allowing double redirects
A question whether double redirects should be allowed in some cases is being discussed on the talk page.
Double redirects and bots
Double redirects are easily fixed automatically by bots[clarification needed], and most are fixed within a couple days of creation. Because of this, human editors would be best off putting their time on other tasks that can't be automated. As of 31 August 2012, the following bots fix double redirects:
|Kwjbot (talk · contribs)||Fixing interwiki and double redirects||Kwj2772||18 June 2008||-Inactive||Rights · BRFAs|
|MalafayaBot (talk · contribs)||Interwiki links, Double redirects, Featured articles||Malafaya||10 September 2006||-Inactive||Rights · BRFAs|
|RussBot (talk · contribs)||Fixing double redirects and disambiguation links, maintaining WP:DPM, maintaining redirected categories||R'n'B||2 June 2005||-Active||Rights · BRFAs
1 · 2
|Xqbot (talk · contribs)||Fixing double redirects, other tasks||Xqt||13 December 2009||-Active||Rights · BRFAs|
|AvicBot (talk · contribs)||Fixing double redirects, other tasks||Avicennasis||22 July 2011||-Active||Rights · BRFAs|
This list was compiled from Wikipedia:Bots/Status.
- alternate link showing 1000 entries:
Checking for double redirects
Suppose you want to check whether there are any double redirects to page C. Go to page C and click "What links here" (usually the first link in the "Toolbox" on the lefthand side of the page). Double (or multiple) redirects are those pages which appear in the list with both of these properties:
- Indented at least one level in comparison to the page at the top of the list, AND
- Labelled "(redirect page)".
Note that if you've just moved page C, then there might be only one page which is not indented, (the page at the top of the list), and everything else might be indented at least one level.
Once all double redirects have been fixed, the "What links here" page will have only three types of pages listed:
- Direct links from ordinary pages (not indented, not labelled "(redirect page)").
- Direct links from redirect pages (not indented; labelled "(redirect page)").
- Indirect links from ordinary pages (indented one level, not labelled "(redirect page)").
The first and third categories do not need to be fixed – see Wikipedia:Redirect#Do not "fix" links to redirects that are not broken.
When MediaWiki won't automatically follow a redirect
MediaWiki will not follow a redirect if:
- there are double redirects
- it is a redirect to a Special page
- it is a redirect to a non-existent page
- it is a redirect to an interwiki page
Old Topbanana method
SELECT concat( '*[http://en.wikipedia.org/w/wiki.phtml?title=', a1.art_title, '&action=edit ', a1.art_title, '] → ', REPLACE( a2.art_title, '_', ' ') , ' → ', REPLACE( a3.art_title, '_', ' ' ) ) FROM art a1 JOIN good_links l1 ON a1.art_id = l1.from_id JOIN art a2 ON l1.to_id = a2.art_id JOIN good_links l2 ON a2.art_id = l2.from_id JOIN art a3 ON l2.to_id = a3.art_id WHERE a1.art_is_redirect = 1 AND a2.art_is_redirect = 1 AND a3.art_is_redirect = 0 ORDER BY a1.art_title;
...and then split into subsections by hand.
The Byrial method builds on this code.