Post Sharing - ability to convert the URL to the short version

Hey wonderful Discourse community!

As you are all aware, there is an existing feature to share a post.

When this share button is pressed, a pop-up appears and looks like:


The full link provided in the image above is:

Notice how long this link is?

Why is this a problem?

  • For some topics the slug can be so long that the shared URL wont even fit within the maximum character limit for some social media platforms. This has a negative impact on the community sharing form posts outside of the forum on social media to generate additional forum traffic.

  • Some social media platforms don’t allow clickable links or even copying text. So users need to manually type out the URL to access the link. Having a super long link increases the chances of a mis-click on the keyboard resulting in a broken link.

  • It looks messy sharing super long links.

There is already a manual solution
There is a feature already built into Discourse which allows you to replace the slug, with a dash, and the link will still work. Both of these links go to the same place. But the first one is drastically shorter.

My proposal is

A) Update the share post pop-up to replace the existing (long URLS containing slugs) with short-links (slugs replaced with “-”).

B) By default enable short-links (slugs replaced with “-”) include a button on the share post pop-up screen that lets the user choose the URL type (long or short).

C) A site setting for site admins to enable or disable based on their preference of a global setting for sharing URLs.

What are your thoughts?

1 Like

No need to use the - :


A checkbox in the sharing pop-up to transform the link into a short version could be a nice addition:



Which ones will count that limit more than using theirs standard amount for all links? Not Twitter or Mastodon AFAIK.

Short links are quite no-no nowadays because users don’t see the target.

1 Like

Can you please try to be a little less ambiguous here?

Twitter for example substitutes all URLs with a shortened link for the purpose of click tracking. They present the original URL in the interface, but all tweets take up 23 characters from the maximum.

1 Like

From my experience, I encountered numerous times forms on websites that had ridiculously and arbitrarily short character limits.
Especially on companies’ or administrations’ websites. Kind of as if they didn’t really want to read a detailed message, request, or complaint from customers or anyone concerned by their services… :upside_down_face:

Though I admit that in my everyday life, I usually don’t encounter issue with long links (and it’s hard to call a Discourse link a “long” link, they don’t have endless query parameters).

It could be a good candidate for, I suppose, a fairly easy theme component.

1 Like

@UnitedFreedom, you can try this theme component, let me know if you encounter any issues: