Help:Redirect: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
To avoid these problems, consider a direct interwiki link, or a non-automatic redirect: a page with "See ...". If you use an interwiki redirect anyway, put on the page to which the redirect po
To avoid these problems, consider direct interwiki links without redirect, or a "non-automatic redirect": a page with "See ...", e.g. en:Wikipedia:Enhanced Recent Changes. This requires an ext
Line 79: Line 79:
The same applies to redirects to Special pages.
The same applies to redirects to Special pages.


To avoid these problems, consider a direct [[interwiki]] link, or a non-automatic redirect: a page with "See ...". If you use an interwiki redirect anyway, put on the page to which the redirect points links to such redirect pages, using a URL with "redirect=no".
To avoid these problems, consider direct [[interwiki]] links without redirect, or a "non-automatic redirect": a page with "See ...", e.g. [[en:Wikipedia:Enhanced Recent Changes]]. This requires an extra click to use, but is less confusing and the redirect page itself is easier to go to (to edit, to apply "What links here" and to discuss it on its Talk page). If you use a "real" interwiki redirect anyway, put on the page to which the redirect points links to such redirect pages, using a URL with "redirect=no".


== Double redirects ==
== Double redirects ==

Revision as of 12:24, 4 October 2003

Other languages: da, de, ja, pl, zh

<-MediaWiki User's Guide

Short form (for easy linking): redirect (or meta:redirect)

For policy on the use and abuse of redirects on the English Wikipedia see en:Wikipedia:Redirect.

See also: MeatBall:PageRedirect

What is a redirect?

MediaWiki uses redirects to direct people who go to one location on a MediaWiki wiki to another. For example, if somebody browses to: http://meta.wikipedia.org/wiki/redirection, or follows a link to redirection, then they will end up at this page instead, and the top of the page will look like:

MediaWiki User's Guide: Using redirects
(Redirected from Redirection)

(etc)

Renamings and merges

Broken links are generally considered to be bad, because they annoy visitors. 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 duplicate pages exist on some subject, or lots of twisty little stubs on different aspects of the same overall subject.

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.

How do I create 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 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 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.

How do I change a redirect?

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 {project name} ...

  1. REDIRECT target page

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

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 other projects or to Special pages. Use http://{project domain name}/w/wiki.phtml?title=...&redirect=no (for projects outside Wikimedia the "w/" is not always used).

How do I delete a redirect?

Administrators can delete redirects in the same way as any other page. There may be project-specific guidelines on when this is appropriate.

Inter-wiki redirects and redirects to Special pages

It is also possible (but controversial) to set up redirects between MediaWiki wikis, such as between Wiktionary and Wikipedia. Simply prefix the page name with the wiki name and a colon. To link to the Wikipedia article for dog from an article in wiktionary, one would use [[EnWikipedia:dog]]. For example EnWikipedia:dog. As a redirect: #REDIRECT [[EnWikipedia:dog]]

However, compared with redirects within a MediaWiki wiki there are restrictions and drawbacks:

  • The message "Redirected from ..." is not shown.
  • Editing the redirect page is cumbersome, one has to use http://{project domain name}/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://{project domain name}/w/wiki.phtml?title=my_title&redirect=no , but replace "my_title" with the title of the page 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 applies to redirects to Special pages.

To avoid these problems, consider direct interwiki links without redirect, or a "non-automatic redirect": a page with "See ...", e.g. en:Wikipedia:Enhanced Recent Changes. This requires an extra click to use, but is less confusing and the redirect page itself is easier to go to (to edit, to apply "What links here" and to discuss it on its Talk page). If you use a "real" interwiki redirect anyway, put on the page to which the redirect points links to such redirect pages, using a URL with "redirect=no".

Double redirects

As a simple way to avoid problems with infinite recursion, in the case one is redirected to another redirect page, the second redirect is not applied.

See also