Help:Redirect

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by Pengo (talk | contribs) at 01:32, 6 February 2007 (previous edit by pengo). It may differ significantly from the current version.
See this page for a WikiProject Redirect guide on writing good redirects.
See also: Wikipedia:Redirect

A redirect is a page with no content other than an entry in the form:

#REDIRECT [[pagename]]

Where pagename is the article or page to redirect to.

How it appears to the user

If the link is to an existing page in the same project, going to the redirect (by means of a link, the URL, or the Go button) results in the new page, just like following the link, except that the browser shows the original URL, and the new page shows a redirection message below the title. (To get the canonical URL in your browser's address bar, click the article tab.)

For example, if somebody goes to: Help:Redirection, then they will end up at this page instead, and the top of the page will look like:

Help:Redirect

From Meta

(Redirected from Help:Redirection)

(etc)

If the link is to a non-existing page in the same project, or to a page in another project, one simply arrives at the redirect page.

As a simple way to avoid problems with infinite recursion, if the redirect target is another redirect page, the second redirect is not applied.

When a page called for inclusion is a redirect page, the redirect target is included instead, with the same parameters, without any redirect message. Again, a double redirect does not work.

Purposes of a redirect

  • Finding a page
  • Conveniently going to a page
  • Conveniently linking indirectly to a page, without the need for a Piped link. For this purpose, making the stem (the common first part) of a collection of strongly related terms a redirect reduces the need for having many redirects. E.g. categor can be used for category, categories, categorical. Note that having the other redirects anyway is even better; also a piped link is in some respects even better than relying on a redirect, see Comparison with piped link.
  • Allowing a link title independent of the final link target; one creates a page whose name is the desired link title, and which redirects to the desired target page. See e.g. w:Template:Ft, containing [[30.48 cm|ft]], with the page w:30.48 cm redirecting to w:Foot (unit of length). The link title "30.48 cm" informs in the hover box about the unit "ft" even without following the link to the article about this unit. See also hover box for another technique with a similar result.

Due to redirects, after renamings and merges, old URLs in links, bookmarks, search engines, etc., still lead to the appropriate page.

The move tool

When a page is renamed/moved with the Renaming (moving) a page function, a redirect is automatically created from the old to the new name, and also one for the corresponding talk page.

If the new page name is occupied by a redirect with only one edit in its history, it is replaced by the page being moved. If the redirect has more than one history entry, then it must either be deleted by an administrator or moved to another name. This move will leave behind a new redirect with no edit history, which can then be replaced by the desired page move. It might be desirable to delete the moved redirect.

Creating a redirect

If you're creating a new redirect, start a new page, write #REDIRECT [[pagename]] (or #redirect [[pagename]]) at the top of the page, where pagename is the name of the target page. Here is an example. If you're replacing an existing page with a redirect, for example after merging a duplicate page, go to th