Scratchpad:Categorizing redirects


This is a Scratchpad guideline for categorizing redirects (i.e., placing redirect pages into categories). It is intended to document current practice and suggest best practice in other areas and indicate where categorization of redirects can be misleading.

When to categorize a redirect

Most redirects should not be placed in article categories. There are, however, maintenance categories specifically for redirects, and most should be in one of those. There are some situations where placing a redirect in an article category is acceptable and can be helpful to users browsing through categories. The following are examples of some of these situations:

Categories just for redirects

There are a series of categories that are used only for redirects. Articles are placed in categories by templates. These categories explain why the redirect exists, for example means it was created by a merge, or means that the redirect is an alternative name for the main title.

These categories are only intended to contain redirects, and are helpful in keeping track of redirects and further subcategorizing them as needed. They include both redirects within main namespace and in other namespaces. They are often applied using templates, though such categories can also be created and populated directly. This categorization is intended for Scratchpad editors, not readers.

For the categorical list of such templates, see Category:Redirect templates. All the redirect categories are subcategories of Category:Redirects, which itself is not meant to contain any redirects and is purposely kept empty.

Redirects whose target title is incompatible with the category

Alternative names should not look out of place on a category page. This is often a way to satisfy disagreements over renaming an article when more than one name seems equally valid. The alternative name(s) becomes a redirect and gets categorized the same way as its target. Another example is when a single article covers things known by multiple names, such as a person who is known in multiple fields of endeavour under different names, a merged article about three different newspapers, or a sketch comedy television show whose name exists on Wikipedia as a redirect to the comedy troupe that created it. In such a case, consideration needs to be given to which title should be reflected in an individual category.

Note that placing such a category on the target article, with the alternative title in pipetext, does not accomplish the desired purpose, as pipetext in a category link only affects how a title is ordered alphabetically, not how it actually appears.

  • Examples:
  • A Racial Program for the Twentieth Century is a hoax article by the phony author Israel Cohen. The redirect to that article, Israel Cohen (hoax) belongs in Category:Nonexistent people used in hoaxes but the article does not.
  • 24 Heures is a French-language newspaper in Montreal, but is covered in the article on its English-language sister publications 24 Hours. However, the French-language newspaper and Montreal newspaper categories must be placed on the redirect, as 24 Hours is not the name of a French-language newspaper published in Montreal, while 24 Heures is. Those categories should contain the correct name of the Montreal publication.
  • Wile E. Coyote and Road Runner is an article that covers both the cartoon and its titular characters. Categories that refer to one of the characters, but not both—such as Category:Fictional coyotes and Category:Fictional birds—are placed on the appropriate redirects.

Alternative names for articles

The primary function of the category system is to allow readers to browse through articles. The category system is often used like an alphabetical index. It is sometimes helpful for redirects from common alternative names to appear in the index list. Editors should consider whether alternative names should be mixed in with other names, or not. Sometimes an entirely new category is more appropriate (see Categorization of multiple taxonomies below).

  • Examples:

Subtopic categorization

Some subtopics of articles have well-known names and, over time, may expand to become separate articles. Many articles cover several topics that have been combined. This can happen following a merge of several related articles. Often there are redirects pointing to these subtopics. These redirects can be categorized. In some cases, the categories for the redirects that point to the subtopics will be different than the categories for the entire article.

  • Example of similar categorization:
  • Butterfly vertebrae points to a subsection of Congenital vertebral anomaly – both appear in Category:Dog health
  • Examples of different categorization:
  • Bibliography of J. R. R. Tolkien (appearing in Category:Bibliographies by writer) points to a subsection of J. R. R. Tolkien (appearing in several other categories).
  • Prohibition in Finland (appearing in Category:History of Finland, Category:Finnish society, Category:1932 in Finland, and Category:Prohibition by country) – redirects to a subsection of Prohibition (appearing in Category:Prohibition and Category:Alcohol law)

Categorization of multiple taxonomies

Some articles can be organized by more than one taxonomy. An example of this is the organization of animal and plant articles by common names and binomial name taxonomy. This is possible by categorizing the article one way and categorizing the redirect a different way. In this case, the alternative categorization of the redirect will not appear in the article unless it is manually added.

  • Examples:
  • An example for plants is: Category:Banksia taxa by common name and Category:Banksia taxa by scientific name.

Categorization of list entries

Some well-organized lists have redirects pointing at their subsections. In such cases, categorization of the redirects can be an alternative way of browsing entries in a long list. It can also provide an alphabetical listing for lists that are not organised alphabetically, for example, lists organised in a chronological order. Redirects to sections of minor character lists should generally only be categorized within that fictional setting, and not in the wider fictional categories.

  • Examples:
  • Category:EastEnders characters provides a single alphabetical listing of both minor and major characters in the BBC soap-opera EastEnders. However, the minor character redirects should not be categorised outside the EastEnders category structure, e.g. not Category:Fictional characters by occupation.
  • Category:Middle-earth horses provides a single alphabetical listing of both named horses and named ponies in J. R. R. Tolkien's Middle-earth.

How to categorize a redirect

A redirect may be categorized in the same way as for any other page; however, when it is possible to use redirect category templates (rcats), then these should be used. For clarity, all category links should be added at the end of the page, after the redirect statement and rcat(s). Use of blank lines between these promotes readability of the code. The template is used to improve the appearance of text on redirects as well as to easily tag a redirect with up to seven rcats. See its documentation and the This is a redirect/Comparison page for more information.

The redirect will appear in the specified categories in a style format that is different than non-redirects (by default, redirects appear in italics – see Technical note below).

Example 1
– a redirect to page Xxyyzz, which uses the and rcats, and which is also sorted to categories Aaa and Bbb, may look like:
#REDIRECT [[Xxyyzz]]

{{R from modification}}
{{R printworthy}}

When the title being redirected is a person's proper name, consensus is to modify the sort key from its default action, (sorted by {{PAGENAME}}), to instead sort it by surname. The {{DEFAULTSORT:}} behaviour switch is used for this; e.g. for George Walker Bush, use {{DEFAULTSORT:Bush, George Walker}} so that the page will show up in the B's and not the G's of the various categories; similarly, for titles beginning with an article such as "the" or "a" - e.g. for The President of the United States, use {{DEFAULTSORT:President of the United States, The}} so that the page will show up in the P's (see Wikipedia:Categorization of people#Ordering names in a category for more information). As with non-redirect pages, it should be positioned immediately before the categories:
#REDIRECT [[Xxyyzz]]

{{R from modification}}
{{R printworthy}}

{{DEFAULTSORT:Last, First Middle}}
When This is a redirect is used, it is applied as follows:
#REDIRECT [[Xxyyzz]]

{{This is a redirect|from modification|printworthy}}

Note that the "R" in rcats may be omitted. Aliases (usually shortcuts) may also be used:
#REDIRECT [[Xxyyzz]]


Redr is an alias for "This is a redirect", R mod for "R from modification" and R pw for "R printworthy".
Note that the "R" in rcat names can either be used, , or omitted in the This is a redirect template ("R" cannot be omitted when rcats individually tag redirects).
Example 2
– a redirect to an article subsection titled "Header":
#REDIRECT [[Xxyyzz#Header]]

{{R to section}}
{{R printworthy}}
When This is a redirect is used, it is applied as follows:
#REDIRECT [[Xxyyzz#Header]]

{{Redr|to section|printworthy}}
Example 3
– a redirect to an article that has an anchor titled "Anchor this" (see {{Anchor}}):
#REDIRECT [[Xxyyzz#Anchor this]]

{{R to anchor}}
{{R unprintworthy}}
When This is a redirect is used, it is applied as follows:
#REDIRECT [[Xxyyzz#Anchor this]]

{{Redr|to anchor|unprintworthy}}
Example 4
– one common redirect need to a geology page Xxyyzz, which uses the R to section rcat to point to the article and section where the common term is defined, and which should be in categories Aaa, Bbb, Ccc and Ddd (the parent article may be sorted to a few more, such as Eee, Fff, etc.), all of which are categories usually found in the parent article. This example would look like this:
#REDIRECT [[Xxyyzz#Section header]] 

{{Redr|to section|to related topic|printworthy}}

1. The #REDIRECT [[Article title]] must come first, on the top line, and must start from the left margin. [[Category:...]] types can be placed on their own lines after the above. Redirect category (rcat) templates, {{R from...}}, {{R to ...}}, etc and the {{This is a redirect}} template may be placed anywhere after the redirect. It is conventional to place them before categories and to leave empty lines between the types for readability.
2. {{PAGENAME}} is a Magic word in wikimarkup language that fills in the pagename (without the namespace) of the redirect unless the pagename of the target page (without namespace) is entered as its first parameter. The first category parameter represented by |{{PAGENAME:Xxyyzz}} (magic words are not templates – note that the colon (:) is used to pass parameters in magic words rather than the pipe (|), which is used in templates) above is in fact the sort parameter used to group pages together in a category list.
3. When the This is a redirect (or Redr) template is used, it will allow rcat parameters as described in its documentation. It takes up to 14 rcat parameters: "p1" through "p7" and "n1" through "n7".
4. As shown above, printworthiness is an important type of sort. We are told in the style guide, "The ultimate goal of the guide is to have every redirect categorised in a standard format, as well as to have every main-namespace redirect categorised as either printworthy or unprintworthy." It is important to note that this only applies to main article namespace redirects and not to redirects in any other namespace.
5. For more detailed information about how to categorize redirects please see the documentation for individual rcats and for the This is a redirect template.
 General information note
ALL the {{R from...}}, {{R to...}}, etc., templates have as their main purpose to populate a redirect subcategory (see ) to aid in maintenance. A second goal is to help editors with concise explanations for such sortings. Generally speaking, one such template categorizes redirect pages to the subcategory, though that template may be "aliased" by use of several alternative phrasings, themselves redirects to the template. Common alias choices are: other vs. alternative, capitalization vs. capitalisation and other such spelling/phrasing variants like "R to singular" vs. "R from plural" and "R from singular" vs. "R to plural".

Technical note

The appearance of a redirect link on category pages and in search results is determined by the CSS class "redirect-in-category" and the specification for that class in MediaWiki:Common.css. By default, this class is set to "italics", although this may be changed by the user. In the past, no distinction was made for users, which fueled the controversies over how to categorize redirects. By displaying them in italics, redirects are easy to pick out. Perfectly good (and in many cases better known) terminology implemented as redirects for technical reasons can now be categorized for the readers to browse, and for editors to know and use as needed.

See also