Home  

Random  

Nearby  



Log in  



Settings  



Donate  



About Wikipedia  

Disclaimers  



Wikipedia





Help:URL





Help page  

Talk  



Language  

Watch  

View source  





Like all pages on the World Wide Web, the pages delivered by Wikimedia's servers have URLs 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 create hyperlinks to chosen URLs, pointing to pages either within Wikipedia and other Wikimedia projects, or elsewhere on the Web.

Linking to URLs

When editing a page, hyperlinks to other pages within Wikipedia (or other Wikimedia projects) are normally made as wikilinksorinterwikilinks, using the [[...]] syntax described at Help: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 using external link syntax.

There are three forms of external link syntax:

Making 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 class="plainlinks">...</span> tags.

sp " ' , ; < > ? [ ] { | }
%20 %22 %27 %2C %3B %3C %3E %3F %5B %5D %7B %7C %7D
Single apostrophes do not need to be encoded; but unencoded multiples will be parsed as italic or bold markup
newline [ ] |
space &#91; &#93; &#124;
; @ $ ! * ( ) , / ~ :
%3B %40 %24 %21 %2A %28 %29 %2C %2F %7E %3A

URLs of Wikipedia pages

English Wikipedia's URLs begin https://en.wikipedia.org/. That address on its own is redirected to the Main Page.

The page name may include a namespace prefix (such as "Help:" in this page). With some special pages it may also include a parameter, as in https://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 in https://en.wikipedia.org/wiki/Train?action=history ), but in this case the system defaults to the second form, i.e. it extends the index.php query string "title=Page_name".

Extended URLs are used:

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, see Templates 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 their canonical form as they are when they appear in wikilinks).

Shorter URL

Wikipedia:URLShortener gives a way to make short URLs to Wikipedia pages.

An unofficial redirect site mentioned at User:Tl-lomas/enwp.org also offers shorter URLs.

enwp.org is not controlled by the Wikimedia 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 uses pageid, 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.

URLs on other Wikimedia projects

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 that https://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 the URL help page on Meta.

Templates and programming

For use in templates, correct URLs can be constructed using certain magic words and parser functions such as fullurl, urlencode and others. Details of these can be found at mw:Help:Magic words.

Most programmatic interaction with Wikipedia can be performed most efficiently using the API, for which URLs beginning https://en.wikipedia.org/w/api.php are used. For details, see mw:API.

See also


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



Last edited on 1 February 2024, at 05:03  


Languages

 


Català
Deutsch
Français

Bahasa Indonesia

Shqip


Türkçe
Tiếng Vit

 

Wikipedia


This page was last edited on 1 February 2024, at 05:03 (UTC).

Content is available under CC BY-SA 4.0 unless otherwise noted.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Terms of Use

Desktop