This help page is ahow-to guide. It explains concepts or processes used by the Wikipedia community. It is not one ofWikipedia's policies or guidelines, and may reflect varying levels ofconsensus. |
Like all pages on theWorld Wide Web, the pages delivered byWikimedia's servers haveURLs to identify them. These are the addresses that appear in your browser's address bar when you view a page. Wikipedia editors also have the ability to createhyperlinks to chosen URLs, pointing to pages either within Wikipedia and other Wikimedia projects, or elsewhere on the Web.
| The instructions on this page mainly apply to editingwikitext using thesource editor, and may not work with the VisualEditor. For guidance, see theVisualEditor user guide. Please remove this notice if VisualEditor users are addressed in a way that makes it unnecessary. |
| Linking and page manipulation |
|---|
When editing a page, hyperlinks to other pages within Wikipedia (or other Wikimedia projects) are normally made aswikilinks orinterwikilinks, using the[[...]] syntax described atHelp:Link. However if you want to link to an outside website, or to certain specially generated Wikimedia pages (such as a past version of an article), it is necessary to provide the full URL. This is done usingexternal link syntax.
There are three forms of external link syntax:
https://meta.wikimedia.org/ produceshttps://meta.wikimedia.org/[https://meta.wikimedia.org/] gives[1][https://meta.wikimedia.org/ Wikimedia] givesWikimediaMaking a link to elsewhere on the same server as the wiki can be simplified by using {{SERVER}}. Example:[{{SERVER}}/relative/url].
To suppress the external link icon, place the external link between<span>...</span> tags.
http:// andhttps:// are always supported.ssh://,gopher://,irc://,ircs://,ftp://,ftps://,sftp://,news://,nntp://,worldwind://,telnet://,svn://,git://,mms:// andmailto: will create a link and an icon but require an agent registered in the browser.%20 (this can be done using the PATH option of the{{urlencode:}} parser function).This list isincomplete; you can help byadding missing items. |
| sp | " | ' | , | ; | < | > | ? | [ | ] | { | | | } |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| %20 | %22 | %27 | %2C | %3B | %3C | %3E | %3F | %5B | %5D | %7B | %7C | %7D |
| newline | [ | ] | | |
|---|---|---|---|
| space | [ | ] | | |
| ; | @ | $ | ! | * | ( | ) | , | / | ~ | : |
|---|---|---|---|---|---|---|---|---|---|---|
| %3B | %40 | %24 | %21 | %2A | %28 | %29 | %2C | %2F | %7E | %3A |
English Wikipedia's URLs beginhttps://en.wikipedia.org/. That address on its own is redirected to theMain Page.
The page name may include anamespace prefix (such as "Help:" in this page). With somespecial pages it may also include a parameter, as inhttps://en.wikipedia.org/wiki/Special:Contributions/Jimbo_Wales (but for most special page parameters, see below).
Other URLs associated with a page are constructed by adding a query string. The string can be added to either of the above forms (as inhttps://en.wikipedia.org/wiki/Train?action=history ), but in this case the system defaults to thesecond form, i.e. it extends the index.php query string "title=Page_name".
Extended URLs are used:
oldid is the revision number), or useTemplate:Oldid. A permanent link to thepresent version of the page can be accessed by clicking "Permanent link" under "tools" on the left side of the page. The version ID is unique across all pages; the title parameter here has no effect, and can be omitted.Special:PermanentLink/1374279 is a wikilink to a page version.cologneblue,modern,monobook,vector,vector2. Registered users can set their skin atSpecial:Preferences#mw-prefsection-rendering.de is the language code for German). Registered users can set their language atSpecial:Preferences.withgadget will work only with gadgets that have been specifically enabled for inline loading. Registered users can load pages atSpecial:Gadgets by enabling the corresponding gadget atSpecial:Preferences#mw-prefsection-gadgets.If constructing URLs for Wikipedia pages, remember to convert spaces into underscores, and to percent-code special characters where necessary, as described in the previous section. (For how to do this in template code, seeTemplates and programming below.)
Various kinds of error message may appear if an invalid URL, or one to which you do not have access, is submitted. In other cases the URL may redirect to a valid one (for example, page titles are converted to theircanonical form as they are when they appear in wikilinks).
Wikipedia:URLShortener gives a way to make short URLs to Wikipedia pages.
An unofficial redirect site mentioned atUser:Tl-lomas/enwp.org also offers shorter URLs.
enwp.org is not controlled by theWikimedia Foundation, so it could stop working or change purpose at any time.
The second form can make a long page name into a short code.It usespageid, which remains accurate even if the page is moved.Pageid has up to 8 digits, shown by clicking "Page information" under "Tools" on the left side of the page.
Other projects use similar URLs to those of English Wikipedia, except that the domain names vary:https://meta.wikimedia.org/ (Meta),https://fr.wikipedia.org/ (French Wikipedia),https://de.wiktionary.org/ (German Wiktionary), etc.
Note thathttps://www.wikipedia.org leads to an international Wikipedia portal page, but other URLs beginning with that prefix redirect to English Wikipedia.
Other projects may also use different strings in place of "/w/" and "/wiki/" in URLs. For details, see theURL help page on Meta.
For use intemplates, correct URLs can be constructed using certain magic words and parser functions such asfullurl,urlencode and others. Details of these can be found atmw:Help:Magic words.
Most programmatic interaction with Wikipedia can be performed most efficiently using the API, for which URLs beginninghttps://en.wikipedia.org/w/api.php are used. For details, seemw:API.