Wikipedia:Double redirects

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Special page Other versions
Short pages User:Zorglbot/Shortpages
DoubleRedirects Double redirects
Uncategorized Category needed
Uncategorized cats
Long pages
Wanted pages Most wanted
Lonely pages Orphaned articles
Dead-end pages Dead-end pages
Dormant pages
New pages
Cross-namespace links
Broken redirects
Protected pages
See also Maintenance Reports

+/-

Shortcut:
WP:2R
WP:DblR
WP:2RE

A redirect is a special 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 undesirable, since Wikipedia's MediaWiki software will not follow the second redirect, in order to prevent infinite loops (to prevent endless looping, a redirect will not "pass thru" more than one entry; if someone is redirected to a redirect, the chain stops after the first redirect). 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 move when old redirects are left unchanged and pointing towards an old name.

Contents

[edit] How to fix a double redirect

An example double-redirect, which has since been corrected by redirecting Morchella esculenta directly to Morchella without using Morel as a half-way point.
An example double-redirect, which has since been corrected by redirecting Morchella esculenta directly to Morchella without using Morel as a half-way point.
  • 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.

[edit] Why do double redirects exist?

Most of the time, double redirects come about because a page is moved from one title to another, and then again to a third title. The second mover will be unaware of the first and leave the first page title redirecting to the second, even though the page is now located at the third.

[edit] Lists

Current list:

alternate link showing 1000 entries: Special:DoubleRedirects&limit=1000

Old lists:

[edit] 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". 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:

  1. Direct links from ordinary pages (not indented, not labelled "(redirect page)").
  2. Direct links from redirect pages (not indented; labelled "(redirect page)").
  3. Indirect links from ordinary pages (indented one level, not labelled "(redirect page)").

The third category does not need to be fixed -- see Wikipedia:Redirect#Do not change links to redirects that are not broken.

[edit] Old Topbanana method

The Topbanana method to generate a double redirect report from a Link Analysis Database is to use the following SQL:

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.

[edit] See also

Personal tools
Languages