Jump to content

Help:Redirect: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
en.wikipedia version
 
m Reverted changes by 204.108.212.220 (talk) to last version by Mtarch11
(454 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
<languages />
[[da:Wikipedia:Hvordan omdirigere jeg en side]] [[de:Wikipedia:Handbuch - Redirect]]
{{ambox|text=<translate><!--T:1--> For technical documentation about redirects, please visit [[<tvar name=1>mw:Special:MyLanguage/Help:Redirects</tvar>|dedicated help page on Mediawiki.org]].</translate>}}
[[ja:Wikipedia:&#12522;&#12480;&#12452;&#12524;&#12463;&#12488;&#12398;&#20351;&#12356;&#26041;]]
[[pl:Wikipedia:Przekierowanie]] [[zh:Wikipedia:%E5%A6%82%E4%BD%95%E9%87%8D%E5%AE%9A%E5%90%91%E4%B8%80%E4%B8%AA%E9%A1%B5%E9%9D%A2]]


<translate>
This tutorial discusses '''redirects''' in Wikipedia.
<!--T:2-->
'''Redirects''' have different use cases through Wikimedia wikis.


== Local policies == <!--T:3-->
== What is a redirect? ==


<!--T:4-->
Wikipedia uses redirects to direct people who go to one location on Wikipedia to another. For example, if somebody browses to: http://www.wikipedia.org/wiki/redirection, or follows a link to [[redirection]], then they will end up at this page instead, and the top of the article will look like:
Some projects have policies on ''what'' redirects should exist. For example, on the [[<tvar name="1">wiktionary:</tvar>|English Wiktionary]], most redirects are prohibited by policy.


=== Broken redirects === <!--T:5-->
<blockquote style="background-color: white; color: black; border:1px solid black; padding: 1em;">
<b><big>Wikipedia:Redirect</big></b><br>
(Redirected from [[Redirection]])<br><br>
This tutorial discusses '''redirects''' in Wikipedia. It will cover the following topics:


<!--T:6-->
''(etc)''
On many wikis administrators simply delete them, but it is sometimes useful to keep a broken redirect and wait for the creation of the target, or to set a new target.
</blockquote>


== Purposes of a redirect == <!--T:7-->
== What do we use redirects for? ==
</translate>
* Abbreviations: [[DSM-IV]] redirects to [[Diagnostic and Statistical Manual of Mental Disorders]]
* <translate><!--T:8--> Allow access in the case that a page name is provided:</translate>
* Misspellings: [[Philisophy]] redirects to [[Philosophy]]
** <translate><!--T:9--> which is an alternative name for the subject</translate>
* Aiding writing: [[planet Mars]] redirects to [[Mars (planet)|Mars]]
** <translate><!--T:10--> which is a name for a subtopic (in this case one may use a redirect to a section)</translate>
* Alternate spellings: [[colour]] redirects to [[color]]
** <translate><!--T:11--> which uses alternative capitalization and hyphenation</translate>
* Alternate names: [[Wellie throwing]] redirects to [[Wellie wanging]]
** <translate><!--T:12--> which uses alternative spelling</translate>
* Alternate capitalisations: [[Natural Selection]] redirects to [[Natural selection]]
** <translate><!--T:13--> which has a common misspelling</translate>
* Alternate languages: [[Die Entführung aus dem Serail]] redirects to [[The Abduction from the Seraglio]]
* <translate><!--T:14--> Provide a way of conveniently going to a page (shortcut).</translate>
* Alternate punctuation: [[Al-Jazeera]] redirects to [[Al Jazeera]]
* <translate><!--T:15--> Keep links to a page active after it has been moved (even if internal links are updated, this still applies for links from outside; also for [[<tvar name="1">Special:MyLanguage/Help:Edit summary#Internal and interwiki links in edit summaries</tvar>|links in edit summaries]]).</translate>
* Plurals, tenses, etc: [[greenhouse gases]] redirects to [[greenhouse gas]], [[garden]] redirects to [[gardening]], etc
* Pseudonyms, nicknames: [[Butcher of Kurdistan]] redirects to [[Ali Hassan al-Majid]], [[Rev. Fred Phelps]] redirects to [[Fred Phelps]]
* Synonyms: [[Linear operator]] redirects to [[Linear transformation]]
* Accents: [[Kurt Goedel]] and [[Kurt Godel]] redirect to [[Kurt Gödel]]
* Sub-topics: [[Distributed denial of service]] redirects to [[Denial of service]]
* Avoiding broken links (see below)


<translate>
Sub-topic redirects are often temporary, eventually being replaced by fully fledged articles on the sub-topic in question. Be conservative when creating sub-topic redirects - they can sometimes be counter-productive, because they disguise the absence of a proper article from editors. Sub-topic redirects should only be used where the main article has a section on the sub-topic. For example, [[denial of service]] has a section on distributed denial of service.
=== Special purposes === <!--T:16-->
</translate>
* <translate><!--T:17--> Conveniently linking indirectly to a page, without the need for a [[<tvar name="1">Special:MyLanguage/Help:Piped link</tvar>|piped link]]. However, a piped link is in some respects even better than relying on a redirect.</translate>
* <translate><!--T:18--> 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. <tvar name="q">[[w:Template:Ft]]</tvar>, containing <tvar name="2"><nowiki>[[30.48 cm|ft]]</nowiki></tvar>, with the page <tvar name="3">[[w:30.48 cm]]</tvar> redirecting to <tvar name="4">[[w:Foot (unit of length)]]</tvar>. The link title "<tvar name="5">30.48 cm</tvar>" informs in the hover box about the unit "ft" even without following the link to the article about this unit. See also <tvar name="6">{{ll|Help:Advanced editing}}</tvar> for another technique with a similar result.</translate>


<translate>
=== Renamings and merges ===
<!--T:19-->
When creating new redirects, bear in mind that creating too many redirects can clutter up the [[<tvar name="1">Special:MyLanguage/Help:Searching</tvar>|search results page]], which can hinder users. Also, don't spend too much time creating redirects. Often it's more important to spend time improving the quality of the target page. A piped link is another way to make a link to a page with a name which does not occur in the first page.


== Using redirects for inexisting but expected pages == <!--T:20-->
We try to avoid broken links, because they annoy visitors. Therefore, if we change the layout of some section of Wikipedia, or we merge two [[wikipedia:duplicate articles|duplicate articles]], we always leave redirects in the old location to point to the new location. Search engines and visitors will probably have linked to ''that'' page at ''that'' url. If the page is deleted, potential new visitors from search engines will be greeted with an edit window. The same is true for anyone who previously bookmarked ''that'' page, and so on.


<!--T:21-->
On a small scale, this applies to cases where we had [[wikipedia:duplicate articles|duplicate articles]] on some subject, or lots of twisty little stubs on different aspects of the same overall subject. On a larger scale, we've had a few fairly major reorganisations:
When an inexisting page Subtopic could be created as a subtopic of Topic page, there are the following possibilities:
</translate>
# <translate><!--T:22--> Redirect Subtopic to Topic, use the [[<tvar name="1">mw:Special:MyLanguage/Help:What links here</tvar>|backlink]] to go from A to B (disadvantage: not very inviting to create a new content page B; inconvenient if A has many backlinks).</translate>
# <translate><!--T:23--> Insert a red link in Topic to Subtopic as invitation or preparation for creating page Subtopic; use the backlink to go from Subtopic to Topic (disadvantage: not obvious for newbie, much less convenient than automatic redirect, especially if B has many backlinks).</translate>
# <translate><!--T:24--> Both (indirect self-link on Topic). To go from Topic to Subtopic, click the link from Topic to Subtopic, which brings you back to Topic, and use the link in the redirect message (for detecting a redirect see hereinbefore; however, there is no distinction between a redirect back, and an onward redirect) (disadvantage, as far as not yet mentioned: not obvious for newbie).</translate>
# <translate><!--T:25--> Ditto but with a soft redirect from Subtopic to Topic, i.e. a page only containing something like "See [<nowiki/>[Topic]]"; one can see at Topic that Subtopic is very short using the [[<tvar name="1">Special:MyLanguage/Help:Link#Stub feature</tvar>|stub feature]] (disadvantages: a soft redirect is non-standard; people who do not know about its reason may change it in a regular redirect; is a little less convenient than automatic redirect; requires stub feature setting)</translate>
# <translate><!--T:26--> Subtopic is a redirect, link from Topic to Subtopic with "<tvar name="code"><code>redirect=no</code></tvar>" parameter, or link to Subtopic's edit page, e.g. [<tvar name="url">https://meta.wikimedia.org/w/index.php?title=Template&redirect=no</tvar> Template] and [<tvar name="url2">https://meta.wikimedia.org/w/wiki.phtml?title=Template&action=edit</tvar> start page Template], respectively.</translate>


<translate>
* Moving away from [[CamelCase]] article names
<!--T:27-->
* Moving away from having homepages in the article namespace (see [[User:Tim Starling/Redirects from : to User:]] for a partial list)
In the 3rd and 4th cases, especially if Topic has a list of links to pages Subtopic, one can mark the links with more info, e.g. by bolding, and explain the marking.
* Moving away from using [[wikipedia:subpages|subpages]] in the article namespace


=== The move tool ===
== See also == <!--T:28-->
</translate>
* [[Special:MyLanguage/Help:Link#Stub feature|<translate><!--T:29--> Detecting links to redirects using the stub feature</translate>]]
* {{ll|Don't delete redirects}}
* [[Redirects in search results - proposed software changes|<translate><!--T:30--> Redirects in search results - proposed software changes</translate>]]
* [[Redirected user pages considered harmful|<translate><!--T:31--> Redirected user pages considered harmful</translate>]]
* <translate><!--T:32--> [[w:Wikipedia:Redirect]]</translate>
** [[w:Wikipedia:Redirects for discussion#When_should_we_delete_a_redirect.3F|<translate><!--T:33--> Deletion policy on Wikipedia for redirects</translate>]]
* [https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/37LKF4KXSTCTO4ZLHDWY3XDQWSBWBDF4/ <translate><!--T:34--> Double redirect fixer</translate>]
* [[mw:Special:MyLanguage/Manual:Page table|<translate><!--T:35--> Page database table manual for how redirects are stored</translate>]]


[[Category:Redirects{{#translation:}}| ]]
When a page is moved/renamed with the the [[Wikipedia:How to rename (move) a page|Move page]] function, a redirect is automatically created from the old to the new name. This is one of the reasons we don't use [[cut and paste]] to change the title of an article.

However, many past renamings took place before the move page function was created by our hard-working developers, and others are done by people not aware of this function. As a result, some redirects have significant amounts of page history. [[Wikipedia:Administrators|Administrators]] are able to fix this by following the following procedure:

# suppose we wish to merge edit history from [[Alabama/History]] (old title) into [[History of Alabama]] (new title):
# Delete [[History of Alabama]], with comment ''deleting to merge page histories - back soon''.
# Move [[Alabama/History]] to [[History of Alabama]], using the move tool.
# [[wikipedia:votes for undeletion|undelete]] the [[History of Alabama]] article.
# Edit [[History of Alabama]] to restore the most recent version.

== How do I create a redirect? ==

If you're creating a new redirect, [[wikipedia:start a new page|start a new page]], write <nowiki>#REDIRECT [[pagename]]</nowiki> at the top of the page, where ''pagename'' is the name of the target page. Here is [http://www.wikipedia.org/w/wiki.phtml?title=redirection&action=edit&redirect=no an example]. If you're replacing an existing article with a redirect, for example after merging a [[wikipedia:duplicate article|duplicate article]], go to the page, edit it, and replace the existing text with <nowiki>#REDIRECT [[pagename]]</nowiki>.

A redirect page will still redirect if there is extra text on the page ''after'' the #REDIRECT command and link (but this text will normally not be seen). However, it will not redirect if there is anything on the page ''before'' the redirect. Also, there must be no spaces between the # and the REDIRECT. Consider copying the <nowiki>#REDIRECT [[pagename]]</nowiki> text into the [[Wikipedia:edit summary|edit summary]] so that people know that you have created a redirect.

After you create a redirect, you get sent to a page with the string "&redirects=no" in the URL. Thus the just created redirect page is shown, not the page to which it redirects. To see your redirect working, use your address bar to delete that part of the URL. Alternatively, create a page that links to your redirect, and then follow that link.

When creating new redirects, bear in mind that creating too many redirects can clutter up the [[wikipedia:searching|search results page]], which can hinder users. Also, don't spend too much time creating redirects - often it's more important to spend time improving the quality of the target article. A [[wikipedia:piped link|piped link]] is another way to make a link to an article with a name which does not occur in the first article.

== How do I change a redirect and/or access its history? ==

Click on a link to the redirect page. Then look for the "<code>(redirected from [[pagename]])</code>" link at the top of the page you've been redirected to. You will be taken to a page looking something like:

<blockquote style="background-color: white; color: black; border:1px solid black; padding: 1em;">
<b><big>Pagename</big></b><br>
From Wikipedia, the free encyclopedia.<br><br>
# REDIRECT [[target page]]
</blockquote>

Then you can access its history and/or edit it:

Click '''Edit this page'''. You can then either change the target of the redirect, or replace the redirect with a brand new article.

Another way to do the same thing: Go to the target page, and click "What links here". This will show you all the back-links from that page, including redirects. To change a redirect, click on it, and then click on '''Edit this page''' as above.

These things do not work for redirects to Wiktionary. Use <nowiki>
http://www.wikipedia.org/w/wiki.phtml?title=...&redirect=no </nowiki>

== How do I delete a redirect? ==

To delete a redirect without replacing it with a new article, list it on [[wikipedia:votes for deletion|votes for deletion]]. See [[wikipedia:deletion policy|deletion policy]] for details on how to nominate pages for deletion.

You might want to delete a redirect if one or more of the following conditions is met:
# The redirect page makes it ''unreasonably'' difficult for users to locate similarly named articles via the search engine. (see [[meta:searches and redirects]] for proposals to lessen this impact]])
# The redirect might cause confusion. For example, "Charles C. Boyer" used to redirect to "Daniel C. Boyer", because Daniel was accidentally called Charles on one external web page. However, this caused confusion with the article on [[Charles Boyer]], so it was deleted.
# The redirect is offensive, such as "Joe Bloggs is a Loser" to "Joe Bloggs".
# The redirect makes no sense, such as [[Pink elephants painting daisies]] to [[love]]

However, avoid deleting such redirects if:
# They have a potentially useful page history. If the redirect was created by renaming a page with that name, and the page history just mentions the renaming, and for one of the reasons above you want to delete the page, copy the page history to the Talk page of the article it redirects to. The act of renaming is useful page history, and even more so if there has been discussion on the page name.
# They would aid accidental linking and make the creation of [[wikipedia:duplicate articles|duplicate articles]] less likely
# They aid searches on certain terms.
# Someone finds them useful. Hint: If someone says they find a redirect useful, they probably do. You might not find it useful - this is not because the other person is a liar, but because you browse Wikipedia in different ways.

For example, redirecting [[Dubya]] to [[George W. Bush]] might be considered offensive, but the redirect aids accidental linking, makes the creation of duplicate articles less likely, and is useful to some people, so it should not be deleted.

== What needs to be done on pages that are targets of redirects? ==

We follow the "[[principle of least astonishment]]" - after following a redirect, the readers's first question is likely to be: "hang on ... I wanted to read about ''this''. Why has the link taken me to ''that''?". Make it clear to the reader that they ''have'' arrived in the right place.

Normally, we try to make sure that all "inbound redirects" are mentioned in the first couple of paragraphs of the article. For example:

* A '''sweater''' (or '''jumper''') is...
** [[sweater]], redirect from [[jumper]]
* '''Longships''' were boats used by the Vikings...
** [[longship]], redirect from [[viking ship]]
* '''Mario Party''' is a video game series...
** [[Mario Party]], redirect from [[Mario Party 2]]
* '''Edvard Munch''' ([[1863]] - [[1944]]) was ... The broadest collection of his works is at on display at the Munch Museum at...
** [[Edvard Munch]], redirect from [[Munch Museum]]

== Self-links, duplicate links ==

Avoid self-links, including self-links through redirects ("loop links"). Also, avoid having two links that go to the same place. These can confuse readers, and cause them to unnecessarilly load the same page twice.

=== Inter-wiki redirects ===

It is also possible to set up redirects between Wikipedia and its sister projects, such as [[Wiktionary]]. Simply proceed the article name with the wiki name and a colon. To link to the wiktionary article for dog, one would use <nowiki>[[wiktionary:dog]]</nowiki>. For example [[wiktionary:dog]]. As a redirect: <nowiki>#REDIRECT[[wiktionary:dog]]</nowiki>

However, compared with redirects within Wikipedia there are restrictions and drawbacks:
*The message "Redirected from ..." is not shown.
*Editing the redirect page is cumbersome, one has to use <nowiki>
http://www.wikipedia.org/w/wiki.phtml?title=...&redirect=no </nowiki>
*"What links here" does not work across wiki's; this applies also to redirects, so one can not see which page(s) redirect(s) to a given page.
*Being led to an other wiki without explicit request may be confusing.

In order to change an inter-wiki redirect (perhaps restoring previous content), manually go to a URL like <nowiki>
http://www.wikipedia.org/w/wiki.phtml?title=my_title&redirect=no </nowiki>, but replace "my_title" with the title of the article in question. You can then view page history, edit the page, etc, in the normal fashion. This is tedious, but it is the only way of doing this, currently.

The same problems apply in the other direction: for example, to redirects from Wiktionary to Wikipedia.

=== Double redirects ===

As a simple way to avoid problems with [[infinite recursion]], you cannot have a redirect to a redirect to an article. In such a case, only the first redirect is followed. See [[Wikipedia:Defective redirects]] for an auto-generated list of double redirects.

== Related topics ==
* [[How does one edit a page]]
* [[Wikipedia:How to rename a page|How to rename a page]]
* Practice editing pages in our [[Wikipedia:Sandbox|Wikipedia sandbox]]!

==Question==
''moved to [[wikipedia talk:Redirect|talk]]''

Revision as of 16:53, 7 February 2024

Redirects have different use cases through Wikimedia wikis.

Local policies

Some projects have policies on what redirects should exist. For example, on the English Wiktionary, most redirects are prohibited by policy.

Broken redirects

On many wikis administrators simply delete them, but it is sometimes useful to keep a broken redirect and wait for the creation of the target, or to set a new target.

Purposes of a redirect

  • Allow access in the case that a page name is provided:
    • which is an alternative name for the subject
    • which is a name for a subtopic (in this case one may use a redirect to a section)
    • which uses alternative capitalization and hyphenation
    • which uses alternative spelling
    • which has a common misspelling
  • Provide a way of conveniently going to a page (shortcut).
  • Keep links to a page active after it has been moved (even if internal links are updated, this still applies for links from outside; also for links in edit summaries).

Special purposes

  • Conveniently linking indirectly to a page, without the need for a piped link. However, a piped link is in some respects even better than relying on a redirect.
  • 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 Help:Advanced editing for another technique with a similar result.

When creating new redirects, bear in mind that creating too many redirects can clutter up the search results page, which can hinder users. Also, don't spend too much time creating redirects. Often it's more important to spend time improving the quality of the target page. A piped link is another way to make a link to a page with a name which does not occur in the first page.

Using redirects for inexisting but expected pages

When an inexisting page Subtopic could be created as a subtopic of Topic page, there are the following possibilities:

  1. Redirect Subtopic to Topic, use the backlink to go from A to B (disadvantage: not very inviting to create a new content page B; inconvenient if A has many backlinks).
  2. Insert a red link in Topic to Subtopic as invitation or preparation for creating page Subtopic; use the backlink to go from Subtopic to Topic (disadvantage: not obvious for newbie, much less convenient than automatic redirect, especially if B has many backlinks).
  3. Both (indirect self-link on Topic). To go from Topic to Subtopic, click the link from Topic to Subtopic, which brings you back to Topic, and use the link in the redirect message (for detecting a redirect see hereinbefore; however, there is no distinction between a redirect back, and an onward redirect) (disadvantage, as far as not yet mentioned: not obvious for newbie).
  4. Ditto but with a soft redirect from Subtopic to Topic, i.e. a page only containing something like "See [[Topic]]"; one can see at Topic that Subtopic is very short using the stub feature (disadvantages: a soft redirect is non-standard; people who do not know about its reason may change it in a regular redirect; is a little less convenient than automatic redirect; requires stub feature setting)
  5. Subtopic is a redirect, link from Topic to Subtopic with "redirect=no" parameter, or link to Subtopic's edit page, e.g. Template and start page Template, respectively.

In the 3rd and 4th cases, especially if Topic has a list of links to pages Subtopic, one can mark the links with more info, e.g. by bolding, and explain the marking.

See also