Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:URL
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Linking to URLs== {{VE documentation}}{{Linking and page manipulation|linking and diffs}} When editing a page, hyperlinks to other pages within Wikipedia (or other Wikimedia projects) are normally made as ''wikilinks'' or ''interwikilinks'', using the <code><nowiki>[[...]]</nowiki></code> 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: * If the URL is simply included in the wikitext, without square brackets, then it appears as written, and a hyperlink is created: <code><nowiki>https://meta.wikimedia.org/</nowiki></code> produces https://meta.wikimedia.org/ * If the URL is placed in square brackets, then a hyperlink is created with a serial number as its label: <code><nowiki>[https://meta.wikimedia.org/]</nowiki></code> gives [https://meta.wikimedia.org/] * If the URL is placed in square brackets followed by a space and some text, then that text is used as the label for the hyperlink: <code><nowiki>[https://meta.wikimedia.org/ Wikimedia]</nowiki></code> gives [https://meta.wikimedia.org/ Wikimedia] Making a link to elsewhere on the same server as the wiki can be simplified by using <nowiki>{{SERVER}}</nowiki>. Example: <code><nowiki>[{{SERVER}}/relative/url]</nowiki></code>. To suppress the external link icon, place the external link between {{tag|span|params=class="plainlinks"}} tags. ===Fixing links with unsupported characters=== {{Shortcut|WP:ENCODE}} * The URL must start with a supported [[URI scheme]]. <code>http://</code> and <code>https://</code> are always supported. <code>ssh://</code>, <code>gopher://</code>, <code>irc://</code>, <code>ircs://</code>, <code>ftp://</code>, <code>ftps://</code>, <code>sftp://</code>, <code>news://</code>, <code>nntp://</code>, <code>worldwind://</code>, <code>telnet://</code>, <code>svn://</code>, <code>git://</code>, <code>mms://</code> and <code>mailto:</code> will create a link and an icon but require an agent registered in the browser. * URLs containing certain characters will display and link incorrectly unless those characters are [[percent-encoded]]. For example, a space must be replaced by <code>%20</code> (this can be done using the PATH option of the [[Help:Parser function#Paths|{{tlc|urlencode:}}]] parser function). {{incomplete list}} {| class="wikitable" ! sp !! " !! ' !! , !! ; !! < !! > !! ? !! [ !! ] !! { !! <nowiki>|</nowiki> !! } |- | %20 || %22 || %27 || %2C || %3B || %3C || %3E || %3F || %5B || %5D || %7B || %7C || %7D |} :{{small|Single apostrophes do not need to be encoded; but unencoded multiples will be parsed as italic or bold markup}} * Titles containing certain characters will display and link incorrectly unless those characters are encoded with HTML character references. {| class="wikitable" ! newline !! [ !! ] !! | |- | space || &#91; || &#93; || &#124; |} * Even though PHP's [https://www.php.net/manual/en/function.urlencode.php urlencode()] automatically percent-encodes them, these characters do '''not''' get URL-encoded by [https://github.com/wikimedia/mediawiki/blob/master/includes/GlobalFunctions.php#L309 wfUrlencode()]. The ":" symbol is a partial exception β it is not encoded anywhere except for IIS 7.0. {| class="wikitable" ! ; !! @ !! $ !! ! !! * !! ( !! ) !! , !! / !! ~ !! : |- | %3B || %40 || %24 || %21 || %2A || %28 || %29 || %2C || %2F || %7E || %3A |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)