# שיתוף פוסט - יכולת להמיר את ה-URL לגרסה הקצרה

**URL:** https://meta.discourse.org/t/post-sharing-ability-to-convert-the-url-to-the-short-version/251763
**Category:** Feature
**Created:** [14 בינואר,‏ 2023,‏ 1:57pm UTC](https://meta.discourse.org/t/post-sharing-ability-to-convert-the-url-to-the-short-version/251763 "2023-01-14T13:57:26Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![UnitedFreedom](https://avatars.discourse-cdn.com/v4/letter/u/ac91a4/32.png) [@UnitedFreedom](https://meta.discourse.org/u/UnitedFreedom)
#### Post date: [14 בינואר,‏ 2023,‏ 1:57pm UTC](https://meta.discourse.org/t/post-sharing-ability-to-convert-the-url-to-the-short-version/251763/1 "2023-01-14T13:57:26Z")

</div>

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:

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/1/d/d1d710c6be879c2b1318528de8ac60a1fa51016c.png)

**The full link provided in the image above is:**  
[https://meta.discourse.org/t/how-should-short-links-be-supported-in-discourse/15339/22](https://meta.discourse.org/t/how-should-short-links-be-supported-in-discourse/15339/22)

_ **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.

[https://meta.discourse.org/t/-/15339/22](https://meta.discourse.org/t/-/15339/22)

[https://meta.discourse.org/t/how-should-short-links-be-supported-in-discourse/15339/22](https://meta.discourse.org/t/how-should-short-links-be-supported-in-discourse/15339/22)

* * *

**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?

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [14 בינואר,‏ 2023,‏ 2:07pm UTC](https://meta.discourse.org/t/post-sharing-ability-to-convert-the-url-to-the-short-version/251763/2 "2023-01-14T14:07:35Z")

</div>

> [@UnitedFreedom](#):
>
> [https://meta.discourse.org/t/-/15339/22](https://meta.discourse.org/t/-/15339/22)

No need to use the `-` :

[https://meta.discourse.org/t/15339/22](https://meta.discourse.org/t/15339/22)

🙂

> [@UnitedFreedom](#):
>
> What are your thoughts?

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

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/4/6/d46db2213401571e46f731da7567e74322d7a639.png)

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [14 בינואר,‏ 2023,‏ 4:46pm UTC](https://meta.discourse.org/t/post-sharing-ability-to-convert-the-url-to-the-short-version/251763/3 "2023-01-14T16:46:00Z")

</div>

> [@UnitedFreedom](#):
>
> wont even fit within the maximum character limit for some social media platforms

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.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [14 בינואר,‏ 2023,‏ 4:55pm UTC](https://meta.discourse.org/t/post-sharing-ability-to-convert-the-url-to-the-short-version/251763/4 "2023-01-14T16:55:24Z")

</div>

> [@UnitedFreedom](#):
>
> 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.

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

Twitter for example substitutes all URLs with a shortened [t.co](http://t.co) 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.

[https://help.twitter.com/en/using-twitter/how-to-tweet-a-link](https://help.twitter.com/en/using-twitter/how-to-tweet-a-link)

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [14 בינואר,‏ 2023,‏ 5:22pm UTC](https://meta.discourse.org/t/post-sharing-ability-to-convert-the-url-to-the-short-version/251763/5 "2023-01-14T17:22:26Z")

</div>

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… 🙃

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.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [14 בינואר,‏ 2023,‏ 11:37pm UTC](https://meta.discourse.org/t/post-sharing-ability-to-convert-the-url-to-the-short-version/251763/6 "2023-01-14T23:37:42Z")

</div>

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

[https://github.com/Canapin/short-share-link/](https://github.com/Canapin/short-share-link/)
