Help:Redirect

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by Mav (talk | contribs) at 02:31, 7 September 2003 (en.wikipedia version). It may differ significantly from the current version.
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

da:Wikipedia:Hvordan omdirigere jeg en side de:Wikipedia:Handbuch - Redirect ja:Wikipedia:リダイレクトの使い方 pl:Wikipedia:Przekierowanie zh:Wikipedia:如何重定向一个页面

This tutorial discusses redirects in Wikipedia.

What is a redirect?

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:

Wikipedia:Redirect
(Redirected from Redirection)

This tutorial discusses redirects in Wikipedia. It will cover the following topics:

(etc)

What do we use redirects for?

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.

Renamings and merges

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 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.

On a small scale, this applies to cases where we had 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:

The move tool

When a page is moved/renamed with the the 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. Administrators are able to fix this by following the following procedure:

  1. suppose we wish to merge edit history from Alabama/History (old title) into History of Alabama (new title):
  2. Delete History of Alabama, with comment deleting to merge page histories - back soon.
  3. Move Alabama/History to History of Alabama, using the move tool.
  4. undelete the History of Alabama article.
  5. Edit History of Alabama to restore the most recent version.

How do I create a redirect?

If you're creating a new redirect, start a new page, write #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 article with a redirect, for example after merging a duplicate article, go to the page, edit it, and replace the existing text with #REDIRECT [[pagename]].

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 #REDIRECT [[pagename]] text into the 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 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 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 "(redirected from pagename)" link at the top of the page you've been redirected to. You will be taken to a page looking something like:

Pagename
From Wikipedia, the free encyclopedia.

  1. REDIRECT target page

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 http://www.wikipedia.org/w/wiki.phtml?title=...&redirect=no

How do I delete a redirect?

To delete a redirect without replacing it with a new article, list it on votes for deletion. See 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:

  1. 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]])
  2. 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.
  3. The redirect is offensive, such as "Joe Bloggs is a Loser" to "Joe Bloggs".
  4. The redirect makes no sense, such as Pink elephants painting daisies to love

However, avoid deleting such redirects if:

  1. 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.
  2. They would aid accidental linking and make the creation of duplicate articles less likely
  3. They aid searches on certain terms.
  4. 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:

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 [[wiktionary:dog]]. For example wiktionary:dog. As a redirect: #REDIRECT[[wiktionary:dog]]

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 http://www.wikipedia.org/w/wiki.phtml?title=...&redirect=no
  • "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 http://www.wikipedia.org/w/wiki.phtml?title=my_title&redirect=no , 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

Question

moved to talk