The MediaWiki software uses redirects to direct people who go to one location on Memory Alpha to another. For example, if somebody follows a link to TNG, then they will end up at the page Star Trek: The Next Generation instead, and the top of the page will include a notice of redirection that looks like this: (Redirected from TNG).
What do we use redirects for?
- Abbreviations: TNG redirects to Star Trek: The Next Generation
- Common misspellings: LaForge redirects to La Forge
- Aiding writing: planet Vulcan redirects to Vulcan (planet)
- Alternate spellings: Kronos redirects to Qo'noS
- Alternate names: suspended animation redirects to stasis
- Alternate capitalizations: Slug-O-Cola redirects to Slug-o-Cola
- Alternate punctuation: Slug O' Cola redirects to Slug-o-Cola
- Unusual plurals: gladii redirects to gladius, Birds-of-Prey redirects to Bird-of-Prey
- Tenses: beaming redirects to beam
- Pseudonyms, nicknames: Miss Turtle Head redirects to B'Elanna Torres
- Synonyms: Linear operator redirects to Linear transformation
- Accents: Max Grodenchik redirects to Max Grodénchik
- Categorization: Jaylah's species redirects to Jaylah, Balthazar M. Edison redirects to Krall
- What links here results: Qo'noS Pop Center redirects to the list Unnamed settlements
- Avoiding broken links (see below)
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.
In accordance with the naming conventions it's best to have an article at a well-defined, unambiguous term, with redirects from looser colloquial terms, rather than vice versa.
How do I create a redirect?
If you're creating a new redirect, start a new page and enter:
#redirect [[PAGENAME]] [[Category:Memory Alpha SUBCATEGORY redirects]]
at the top of the page, where PAGENAME is the name of the target page and SUBCATEGORY is the redirect category that matches the target page's categories. 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 the code above.
A redirect page will still redirect if there is extra text on the page after the #redirect command and link, like the category, 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" text. You should have a space between the "redirect" and the PAGENAME though. 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 link on another page 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 just because you want the link to display something other than the name of the page – a piped link (for example, [[Example page|a great example]]) is another way to make a link to a page with a name which does not occur in the first page.
Renamings and merges
We try to avoid broken links, because they annoy visitors. Therefore, if we change the layout of some section of Memory Alpha, 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.
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 the page displaying the redirect code.
Then click "edit" the redirect 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" as above.
When should we delete a redirect?
This isn't necessary if you just want to replace a redirect with an article.
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.
- The redirect might cause confusion.
- 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 [[Vulcan]].
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 make the creation of 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 Memory Alpha in different ways.
To avoid having a redirect deleted that you think is useful, please add it to the List of redirects.
Avoid self-links, including self-links through redirects ("loop links"). The only exceptions to this are redirects for single example ships and people, where the ship class/type or the species will be a redirect, like how Bonaventure type redirects to Bonaventure (10281NCC). Also, avoid having two links that go to the same place on one page. These can confuse readers, and cause them to unnecessarily load the same page twice.