Help talk:URL

message: According to the table at Fixing links with unsupported characters, the characters "" (comma), "" (semicolon) and "" (question mark) are unsupported and need to be encoded. But as far as I can see these three work just fine in their original forms. Did something change or is the text just overly cautious?  --Lambiam 19:40, 6 June 2012 (UTC)
replies: text: "", "", "", "" and "".
 --Lambiam 20:09, 6 June 2012 (UTC)
thread_title:  Unsupported? 

message: For some reason  (now) gives  not  as advertised on this help page. /37.197.83.144 (talk) 14:10, 31 July 2013 (UTC)
replies: text: The encodings at Help:URL#Fixing links with unsupported characters are needed to get an external URL working properly inside Wikipedia markup. The urlencode parser function has a different purpose, to encode arbitrary text so that it can be part of a URL. -- John of Reading (talk) 14:31, 31 July 2013 (UTC)
replies: text: I did mean in the context of encoding urls inside Wikipedia markup. That section specifically says "For example, a space must be replaced by %20 (this can be done using the  parser function)." So if I want to link to  then the required url is  but using urlencode as suggested we get . So the properties of urlencode have changed and either the help page should be updated or a bug has sneaked in and should be reported. /37.197.83.144 (talk) 15:09, 31 July 2013 (UTC)
replies: text: Now I see what you are getting at. The job can be done with the urlencode function, but only by using one of its optional keywords:  is . I've added a few words to the help page to make this clearer. -- John of Reading (talk) 15:23, 31 July 2013 (UTC)
replies: text: Ah. That explains it. Many thanks. /37.197.83.144 (talk) 16:11, 31 July 2013 (UTC)
thread_title: space not encoded per this help page

message: It appears that hyperlinks from Wiki replace the page that you are on and the back and forward arrows are used to navigate between hyperlinked locations once they are visited.  
Is there a way to specify a hyperlink to launch a new page?
THANKS for your help!!!  — Preceding unsigned comment added by 72.37.249.100 (talk) 18:55, 9 January 2015 (UTC)
replies: text: What browser do you use? In Firefox I right-click on a link and select "Open Link in New Tab". A click with the middle mouse button does this too. -- John of Reading (talk) 19:08, 9 January 2015 (UTC)

text: (edit conflict) Wikipedia has no way to specify this for others who click a link. Your browser probably has a feature to do it for you, maybe Ctrl+click or Shift+click. Registered users have the option "Open external links in a new tab/window" at Special:Preferences#mw-prefsection-gadgets. PrimeHunter (talk) 19:11, 9 January 2015 (UTC)
thread_title:  Open a new page with a hyperlink 

message: How can we create a short url of a Wikipedia article for Twitter? Snurl wouldn't cut it.Oceanflynn (talk) 16:39, 6 March 2015 (UTC)
replies: text: If snurl doesn't cut it then use another service like http://tinyurl.com at URL shortening#URL shortening services. I have just created http://tinyurl.com/7u8sx2y for https://en.wikipedia.org/wiki/URL_shortening as a test. URL shortening services are blacklisted as external links in Wikipedia (for good reasons) so I couldn't save tiny.url as a clickable link. PrimeHunter (talk) 17:52, 6 March 2015 (UTC)

text: I don't have a Twitter account and don't know what they actually allow but if you still have problems then the place to ask is Wikipedia:Reference desk/Computing. PrimeHunter (talk) 18:01, 6 March 2015 (UTC)

text: By clicking "Permanent link" in the left pane of a Wikipedia page you can get a link to the latest revision of that page. See Help:Permanent link. If the page is edited later then the link will still go to the version at the time of your click. The url is long but can be shortened. For URL shortening I currently get https://en.wikipedia.org/w/index.php?title=URL_shortening&oldid=650127212. Testing shows it can be reduced to https://en.wikipedia.org/?oldid=650127212. I give no guarantee such url's will continue to work, and it will fail with no trace of the page name if that revision is deleted for some reason. enwp.org is currently a redirect to en.wikipedia.org (also no guarantee this will continue), so http://enwp.org/?oldid=650127212 works now. PrimeHunter (talk) 18:20, 6 March 2015 (UTC)
replies: text: If you want the current revision of the same page, try http://enwp.org/?curid=3919945 which is shorter by two characters. --Redrose64 (talk) 19:51, 6 March 2015 (UTC)
replies: text: Nice. I wondered whether the page ID could be used in a link. The ID can be found by clicking "Page information" in the left pane. curid is not documented at Help:URL#URLs of Wikipedia pages but it is at :mw:Manual:Parameters to index.php. Newer pages have 8-digit ID's. PrimeHunter (talk) 01:00, 7 March 2015 (UTC)

text: I'm a little surprised that the slash after the domain can also be dropped, at least in my tests where http://enwp.org?curid=3919945 works, both when clicked and when copy-pasted to the browser address bar. I don't know how stable it is but it worked in all five tested browsers. PrimeHunter (talk) 01:10, 7 March 2015 (UTC)
replies: text: I have added mention of this to the page. PrimeHunter (talk) 00:27, 9 March 2015 (UTC)
replies: text: Perhaps it's worth mentioning somewhere that in a Wikipedia query string, the oldid= parameter overrides curid=, as does a diff= with numeric value; and that curid= overrides title= --Redrose64 (talk) 14:44, 9 March 2015 (UTC)
thread_title: Short urls

message: The following recommndation in this help article to use protocol-relative URLs seems to be outdated:
Dropping http: and https:
If you make an external style link using square brackets [...] from a Wikimedia page to other Wikimedia page, including Wikipedia of course, it's better to drop the protocol http: or https:, so that the URL begins with //..., e.g. //en.wikipedia.org/w/index.php?title=Help:URL.
Otherwise, readers are forced to use the specified connection method. If you don't specify the protocol, readers can continue to use the protocol to read that page.
The URL returned by  magic word begins with //.
* Example: no protocol
* Result: no protocol (Read this page both with http and https.)
* Example: [/w/index.php?title=Help:URL no protocol]
* Result: [/w/index.php?title=Help:URL no protocol] (Read this page both with http and https.)
In contrast to the above, see Help:Link §http: and https:
http: and https:
In mid-2015, Wikipedia and all other Wikimedia sites were changed to use HTTPS to encrypt all traffic.  Accessing a URL like http://en.wikipedia.org/wiki/Help:Link will result in the webserver redirecting you to https://en.wikipedia.org/wiki/Help:Link.  Therefore, when making an external-style link to an internal page (that is, using single square brackets, or a bare URL), https should be specified to avoid the needless redirect, as in https://en.wikipedia.org/w/index.php?title=Help:Link&action=history.
In the past, when Wikipedia could be accessed via either HTTP or HTTPS, a protocol-relative URL could be used to make an external link (or external-style link to an internal page) which would use http: or https: depending on how the page the link appeared on was accessed, as in .  However, as all Wikimedia sites now require HTTPS, this linking style is obsolete and should no longer be used.  http: or https: should be explicitly specified as appropriate for the target site (preferring https:, where available).
Should it therefore be updated here to match?  That said, the explanation in the latter blockquote is actually wrong at a technical level; there is not a redirection happening with the protocol-relative URL for fellow Wikimedia pages, as it now will always be coming from an HTTPS Wikipedia page and causing the user to navigate to another HTTPS Wikimedia page; "https://" and "//" will always result in the exact same request, now. (Well, at least as long as this is happening from a Wikimedia-hosted site. That is, the two would give different results when navigating from one of those copies of Wikipedia that exist, if it's on an HTTP site. Also, if a user saves a page locally, the browser will futilely try to load the linked page with the "file://" protocol, unless the user's browser automatically changed URLs to fully qualified ones when saving the originating HTML file.)  —Undomelin (talk) 23:03, 24 January 2019 (UTC)
thread_title:  "Dropping http: and https:" section apparently contradicts more recent recommendation 

message: I couldn't find mentioned here how browsers (at least mine) accept the _ character in place of spaces. Let's take an example - our Gravity (2013 film) article as external URLs:
*  encoded with underscores
*  encoded with percent-twenties
Assuming both work in general, please update the documentation. CapnZapp (talk) 18:45, 4 February 2021 (UTC)
replies: text: Your browser treats %20 the same as a space, and similarly treats %5F the same as an underscore. It treats spaces and underscores differently (whether percent-encoded or not); it is the MediaWiki software that treats them as equivalent. --Redrose64 🌹 (talk) 19:44, 4 February 2021 (UTC)
replies: text:  Thank you but I'm asking why our Help page only talks about %20 and not underscores. (The underscore is mentioned exactly once, where its function is taken for granted). We should not treat our readers as browser experts and wiki beginners at the same time. Since you can't use URLs on Wiki without the use of a browser, the distinction "it's your browser that does it, not MediaWiki" is irrelevant. Or, perhaps not irrelevant - if the distinction is important it can be mentioned but the main point is that we can't just explain %20's but not underscores... CapnZapp (talk) 22:41, 4 February 2021 (UTC)
thread_title:  underscores as spaces