Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  



























Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 URL search patterns  





2 API  





3 Toolforge  





4 Notes  





5 Footnotes  














Help:Linksearch








 

Edit links
 









Help page
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 


















From Wikipedia, the free encyclopedia
 


Special:Linksearch is a special page which searches for external links in Wikipedia. It provides a list of external links (in all namespaces) whose target URL starts with the given URL pattern. For each link the page in which it is found is listed, along with the exact target URL of the link on that page. The results are ordered alphabetically by target URL.

(For very large or specialized external link searches, one may also use SQL queries against the externallinks table at Quarry.)

URL search patterns[edit]

The URL pattern can be:

If no protocol is specified in the input box "http://" and "https://" results will be returned. To search a single protocol or another protocol, such as "ftp://", they must be given explicitly.

In the URL of the special page where the search string contains an anchor, or the first part of an anchor name, the hash character # has to be coded as "%23" and the required style is

    w/index.php?title=Special:Linksearch&target=URL

In each of the styles

    wiki/Special:Linksearch/target_page_name#anchor_name
    wiki/Special:Linksearch/target_page_name%23anchor_name

the anchor is ignored. ("w" and "wiki" can be different on other than Wikimedia wikis.)

API[edit]

This special page's functionality can also be accessed through the Wikipedia API using list=exturlusage.

Toolforge[edit]

toolforge:linksearch (currently offline) is similar to Special:LinkSearch, but additionally allows filtering by namespace, and additional placeholders may be used. For more information see Help:Linksearch/Toolforge.

Notes[edit]

For links in external link style, Linksearch provides backlinks of sections, which "Special:Whatlinkshere" does not for links in internal link style. For links in interwiki link style there is no backlink feature at all.

On the other hand, links in internal link style provide existence detection. Also each of the three styles can have a different look, depending on CSS.

Therefore it is useful to combine the advantages of various link styles adding "hidden external links" to internal section links and to all interwiki links, except those for which the interlanguage link feature applies. This is done by adding <span style="display:none">http://...</span>; this can conveniently be done with a template, see below. Although no actual link is added (which would be superfluous because we have already an internal or interwiki link), it is recorded as external link, and therefore Linksearch can find it.

Since Linksearch allows specifying the first part of an anchor, it is useful, if anchor names are numerical or have a numerical end, to use leading zeros. Otherwise, when searching for links to e.g. "1", we also get links to "10", etc. This is e.g. applied in Template:Current events header. More generally, if there are anchors "a" and "ab", it may or may not be desired that a search for links to "a" also gives links to "ab"; if not, use an anchor "_a".

Also, if anchor names have multiple components, it is useful to put the most significant component first, e.g. if anchors indicate months or dates, we could have the format YYYY-MM, or YYYY-MM-DD, or in a year page MM-DD (see also Calendar date#Big endian forms, starting with the year), with leading zeros (see also Help:Date formatting and linking#Link to date content other than required for autoformatting). This applies also for page names, but since these are highly visible, as opposed to anchors, other considerations play a role too. In the case of sections, if for link targets another naming scheme is desired than for display of section headers, anchorscan be put explicitly instead of using section names. This is applied in {{Current events header}}, where the use in links of the names of explicitly put anchors is enforced by using pseudo sections, with displayed headers that cannot be used as anchors.

In the case of multiple sections with the same name, the HTML produced has an HTML ID that is the section name, with, from the second occurrence, "_2", "_3", etc. appended. This does not apply when other anchors are used.

Footnotes[edit]

  1. ^ The script resultListSort provides the possibility to obtain an alphabetic list of the pages, grouped according to their namespaces.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Help:Linksearch&oldid=1218248004"

Categories: 
Wikipedia how-to
Searching in Wikipedia
Wikipedia link help
Wikipedia external links
 



This page was last edited on 10 April 2024, at 16:17 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki