Discourse cites an article by its link, and one link is one Article. So a link is written in one spelling before it is stored, by the rules below. Nothing is fetched to decide it, and no redirect is followed.
| Rule | A link as given | As stored |
|---|---|---|
| The scheme and host in lower case, the default port dropped | HTTPS://Example.COM:443/Report | https://example.com/Report |
| A fragment dropped | https://example.com/a#comments | https://example.com/a |
| A hash-bang fragment kept | https://example.com/#!/news/42 | https://example.com/#!/news/42 |
| A bare hash-bang dropped | https://example.com/a#! | https://example.com/a |
| An escape of a plain character decoded | https://example.com/%7Euser/%41 | https://example.com/~user/A |
| Other escapes in upper case | https://example.com/caf%c3%a9 | https://example.com/caf%C3%A9 |
| Non-ASCII escaped | https://example.com/café | https://example.com/caf%C3%A9 |
| A dot segment removed | https://example.com/a/./b | https://example.com/a/b |
| A double-dot segment removes the one before it | https://example.com/a/../b | https://example.com/b |
| An escaped double dot, decoded first, then removed | https://example.com/a/%2E%2E/b | https://example.com/b |
| An empty path becomes a slash | https://example.com | https://example.com/ |
| Tracking parameters removed, the others kept in order | https://example.com/a?b=2&utm_medium=social&a=1&gclid=X | https://example.com/a?b=2&a=1 |
| Empty parameters removed | https://example.com/a?a=1&&b=2& | https://example.com/a?a=1&b=2 |
| A query left empty dropped, with its question mark | https://example.com/a?utm_source=newsletter | https://example.com/a |
These are not merged. Each is its own Article.
| Difference | One link | The other |
|---|---|---|
| With www. and without | https://www.example.com/a | https://example.com/a |
| With a final slash and without | https://example.com/a | https://example.com/a/ |
| A plus and an escaped space | https://example.com/a?q=a+b | https://example.com/a?q=a%20b |
| An escaped slash and a slash | https://example.com/a%2Fb | https://example.com/a/b |
| Capitals in the path | https://example.com/A | https://example.com/a |
| The parameters in another order | https://example.com/a?b=1&a=2 | https://example.com/a?a=2&b=1 |
| A parameter that is not on the tracking list | https://example.com/a?ref=home | https://example.com/a |
| Capitals in a tracking name | https://example.com/a?UTM_Source=x | https://example.com/a |
| Two different hash-bang pages | https://example.com/#!/a | https://example.com/#!/b |
Where a rewrite would be a guess, the link is refused and the operator gives the spelling they mean.
| A link | Why |
|---|---|
http://example.com/a | The link is not https. |
https://user:secret@example.com/a | It carries a user name or password. |
https://example.com./a | Its host ends with a dot. |
https://bücher.example/a | Its host is not ASCII; give its xn-- spelling. |
https://[::1]/a | Its host is an IPv6 address. |
https://example.com/a b | It holds a space or a control character. |
https://example.com/100% | A percent sign that starts no escape: whether it meant itself is a guess. |
A query parameter whose name starts with a prefix marked * or is exactly a name below is dropped: it is added by whoever shared the link, not by the publisher. Names are matched in lower case only. The list is fixed.
| Parameter | Added by |
|---|---|
utm_* | Google Analytics campaign tags, set by whoever shares the link |
_gl | Google Analytics' cross-domain linker |
_hsenc | HubSpot email |
_hsmi | HubSpot email |
dclid | Google Campaign Manager and Display & Video 360 |
fbclid | Facebook and Messenger, on an outbound click |
gbraid | Google Ads, on an iOS app-to-web click |
gclid | Google Ads, on an ad click |
igshid | Instagram, on a shared link |
li_fat_id | LinkedIn Ads |
mc_cid | Mailchimp: the campaign |
mc_eid | Mailchimp: the recipient of the email |
mkt_tok | Marketo email |
msclkid | Microsoft Advertising |
ttclid | TikTok Ads |
twclid | X (Twitter) Ads |
wbraid | Google Ads, on an iOS web-to-app click |
yclid | Yandex Direct |