Help:What links here

Within the Toolbox section on the left-hand side of every page is a link labeled "What links here". This is used to see a list of the pages that link to (or redirect to, or transclude) the current page. These are sometimes referred to as backlinks.

It is also possible to make a wikilink to the "What links here" list for a particular page; to do this type  Special:WhatLinksHere/ Page name, replacing Page name with the title of the target page. (The same text – without the brackets – can also be entered in the search box, to access "What links here" for any page title.)

To use the tool, click Special:WhatLinksHere and type in the page title.

Overview
The "What links here" facility lists the pages on the same site (English TechInfoDepot) which link to (or redirect to, or transclude) a given page. It is possible to limit the search to pages in a specified namespace. To see this information, click the "What links here" link while looking at any page. The list is sorted by page ID, i.e., by date of creation of the page.

This information comes from the pagelinks table and the templatelinks table. Pages redirected to the given page are marked "redirect". Pages transcluding the given page are marked "transclusion"; for these pages it is not shown whether they also link to the given page. For image and other file pages, the pages using the image or file appear on the list and are marked "image link".

The list of links to an article is useful in a number of ways:
 * The number of incoming links gives a rough indication of how important or popular a page is.
 * Where the intended subject material of an article is unclear, the list of articles linking to it might provide useful context.
 * It facilitates proper disambiguation.

The function works even for a page title that does not exist (recording redlinks to that title). The "What links here" link appears on the edit page on which one arrives when following a broken link. Thus, for example, if film articles are linked to the actors, one can find the films an actor has played in even if there is no article about the actor.

To invoke a "What links here" list directly (in the search box, browser address bar, or wikilinks) use the syntax Special:WhatLinksHere/John Smith (replacing "John Smith" with the desired target article title).

Limitations
The following links are not listed at "What links here":
 * automatically generated links from categories to their subcategories and member pages (and vice versa)
 * automatically generated links from subpages to their parent pages
 * links in edit summaries

In the case of links to sections or other anchors, the precise target is not shown. "What links here" cannot list the backlinks of a specific section/anchor only. (It may be possible to work round this by making a new title that redirects to a particular section, and encouraging people to make links to the redirect rather than the section. Another possibility is to use Linksearch, but here users would have to add hidden external links.)

Also note that if a page's links change due to a change in a template, the backlinks for that page are not updated immediately, but via the job queue.

Redirects
The backlinks feature shows which backlinks are redirects. The backlinks of the redirect are also shown, and if they include a redirect, the backlinks of that also (not more). This makes it a useful tool for finding double redirects, which should generally be replaced by redirects to the final target. There are options to filter the backlinks table to hide redirects, or to show only redirects (by hiding links and transclusions).

Transclusions
The backlinks list includes transclusions of the current page.

It also includes links which exist on certain pages due to the transclusion of other pages (templates). For example, if page A contains a transclusion of template B, and B contains a link to C (not contained within tags), then the link to C will appear on page A, and A will be listed among the backlinks of C.

It is possible that pages may contain links to C as a result of the transclusion of a template even though the template does not itself contain such links (the links may be produced in the template wikitext by the application of various parser functions, rather than explicitly). In this case the template will not show up in the backlinks of C, although pages on which it is transcluded will (if they have the links to C). It may be convenient to make the template appear on the list by placing a link to C on the template, within tags.

Number of links
The "What links here" page does not display how many backlinks exist in total. The number of links displayed at one time is limited – initially to 50, although there are links to change this to certain other values. (Different values can be obtained by editing the URL resulting from clicking these links, but the maximum possible value is 5,000.) There is a tool which returns the total number of backlinks to a page: use the following URL:
 *  http://toolserver.org/~dispenser/cgi-bin/backlinkscount.py?title= Page_name

For extended syntax see the tool documentation page.

Finding external links to a page
For a given source wiki we can find the external links to any URL with Special:LinkSearch. Thus, in particular, we can find e.g. pages on the English TechInfoDepot having an external link to this page or even to an old version, an edit or history page, etc. (provided that the parameter "title" comes first): .

This feature does not detect interwiki links (in double square brackets), only those using external link syntax.

Extensions and programming
The "What links here" page body has selector body.page-Special_Whatlinkshere, so for example we can use the CSS body.page-Special_Whatlinkshere ul { list-style: decimal } to number the backlinks.

It is possible to obtain the list of backlinks (with additional information) programmatically using the MediaWiki API. For information on how to do this, see the API documentation.

With the extension Semantic MediaWiki (SMW) links are categorized by specifying relations. For a given relation the backlinks of a page can be produced in-page. A series of queries, one for each relation (which seems cumbersome but can be put in a template like ), provides an in-page list of backlinks sorted by relation. Moreover, forward links and attributes of the resulting pages can also be provided, and also backlinks of backlinks.

A simpler extension that can embed backlinks (without the semantic functionality) is Dynamic Page List.

It is not possible to simply transclude a "Special:WhatLinksHere/Page_name" page, as only a certain sub-group of Special Pages can be transcluded: TechInfoDepot:Transclusion.

Examples
Special:WhatLinksHere/James Fowler

Special:WhatLinksHere/Help:What links here