# How to remove "Website Name" links shared in a topic/post?

**URL:** https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646
**Category:** Support
**Created:** [March 9, 2023, 8:52pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646 "2023-03-09T20:52:27Z")
**Posts on this page:** 20
**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: [March 9, 2023, 8:52pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/1 "2023-03-09T20:52:27Z")

</div>

When I add an internal link on my Discourse instance like…  
`https://MyWebsite.com/t/MyCategory`

It will resolve to a more user friendly link that looks like…

[My Category - My Website Name](https://MyWebsite.com/t/MyCategory)

- Notice how it includes `- My Website Name`

But when I post an internal link from [Meta.Discourse.org](http://Meta.Discourse.org) in the Meta Discourse instance, It does not include `- Meta Discourse` as shown below.

[About the Feature category](https://meta.discourse.org/t/category-definition-for-feature/11)

How can I achieve this on my own Discourse instance? I dont want `- Meta Discourse` or `- My Website Name` from showing in these resolved links.

Thanks!

### UPDATE

- I have changed the links above to better represent my question.

### SOLVED

The reason why the Meta Discourse link does not show `- Meta Discourse` and my website link does, is because my website link is for a **category** , while the meta.discourse link is for a **topic** as @supermathie has pointed out.

To combat this issue on my own website, I will simply use  
`[My Category](https://MyWebsite.com/t/MyCategory)` markdown to avoid it adding the `- My Website Name` to the end of it. as @Heliosurge has pointed out.

Thanks both for your helpful input!

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [March 9, 2023, 9:02pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/2 "2023-03-09T21:02:56Z")

</div>

Intra-site _topic_ links to the same site don’t include the category or site name:

same site, topic: [About the Feature category](https://meta.discourse.org/t/category-definition-for-feature/11)

same site, category: [Feature - Discourse Meta](https://meta.discourse.org/c/feature/2)

different site, topic: [Category definition for Gaming - gaming - Discourse Demo](https://try.discourse.org/t/category-definition-for-gaming/42)

different site, category: [gaming - Discourse Demo](https://try.discourse.org/c/gaming/6)

vs. the same on Try:

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/3/9/73914b9f971565179f8c9d11e258a88c493d5699.png)

(as to how you can change that, I’m not sure where that is, but that’s why it’s different)

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 9, 2023, 9:08pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/3 "2023-03-09T21:08:55Z")

</div>

Is the link being used internal use?

There is also an option to Wrap Text in [Text]followed by the link wraped in “(link)”

ie  
[This topic post#1](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646)

```plaintext
[This topic post#1](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646?u=heliosurge)

You can also do this to the link

[This topic post#1](https://meta.discourse.org/t/
/257646)

If internal you can shortner it to this.

[This topic post#1](/t/
/257646)

```

---

<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: [March 9, 2023, 9:51pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/4 "2023-03-09T21:51:03Z")

</div>

Thank you both for your helpful replies. It was hard to mark which is the solution.

@supermathie Shared the logic, root cause of the issue and in a way solve the issue by avoiding using Categories as links.

@Heliosurge Provided the solution to resolve the issue as a whole.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [March 9, 2023, 9:52pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/5 "2023-03-09T21:52:51Z")

</div>

> [@UnitedFreedom](#):
>
> the solution

Ah! Thought you already were aware since you used this method in your OP:

```plaintext
It will resolve to a more user friendly link that looks like...

 [My Category - My Website Name](https://MyWebsite.com/t/MyCategory)

```

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 9, 2023, 9:53pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/6 "2023-03-09T21:53:20Z")

</div>

Yeah it can be hard when multiple roots have value.

A #Customization > Theme component you might like for sharing content externally as links can be quite long. Is Share Link Shortener

> [@Share Link Shortener](https://meta.discourse.org/t/share-link-shortener/251965):
>
> discourse2Summary Share Link Shortener adds a checkbox in the share link modal that replaces the share link with a shorter version containing only the IDs of the topic and post.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/share-link-shortener)hammer_and_wrenchRepository [https://github.com/discourse/discourse-share-link-shortener/](https://github.com/discourse/discourse-share-link-shortener/)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Features This theme component is e…

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 9, 2023, 9:57pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/7 "2023-03-09T21:57:12Z")

</div>

I think he was looking to strip the link down if not mistaken to bare minimum. My final shortened link is handy as it also prevents an issue if the client changes domain name breaking the links.

---

<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: [March 9, 2023, 10:05pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/8 "2023-03-09T22:05:53Z")

</div>

Your right. I did know how to use…

> [@supermathie](#):
>
> ```plaintext
> It will resolve to a more user friendly link that looks like...
> 
> [My Category - My Website Name](https://MyWebsite.com/t/MyCategory)
> 
> ```

In a perfect world, I was hoping for a checkbox to untick  
`[] Exclude Website Name from Internal Category links`

This perfect world solution would prevent other users who post `https://MyWebsite.com/t/MyCategory` (without markdown - `[Text](link)`) and having it resolve to `Category - My Website Name`

So although @heilyatsitepoint solution does not solve the issue for other users posting category links without markdown, it will at least solve the issue for when I make posts (since I will always use the markdown).

For the remaining of other users posts…I may just have to turn a blind eye…or edit their post and add the markdown for them. - Yes, I have a little bit of OCD lol.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [March 9, 2023, 10:09pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/9 "2023-03-09T22:09:06Z")

</div>

This is kind of what I was wondering… since we exclude the site name from intra-site topic links, we may want to also exclude the site name from intra-site category links.

I should mention there’s another way of doing this that might suit you: #Contribute > Feature (`#contribute:feature`) gives you a direct link to the category.

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 9, 2023, 10:09pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/10 "2023-03-09T22:09:08Z")

</div>

This will be of interest for you and other users

 ![Screenshots_2023-03-09-18-07-54](https://global.discourse-cdn.com/meta/original/4X/2/0/8/2082d1f9c6c3d6b00218b98f70a951c834326deb.png)

 ![Screenshots_2023-03-09-18-08-16](https://global.discourse-cdn.com/meta/original/4X/0/a/5/0a5078afd1d438e8a624e99116085c2dbcb408dd.png)

[Share link shortener](https://meta.discourse.org/t/share-link-shortener/251965)

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 9, 2023, 10:11pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/11 "2023-03-09T22:11:12Z")

</div>

Excellent suggestion for both Category link and tags.

---

<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: [March 9, 2023, 10:12pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/12 "2023-03-09T22:12:13Z")

</div>

> [@Heliosurge](#):
>
> I think he was looking to strip the link down if not mistaken to bare minimum.

Negative. No matter how long or short the URL is, its resolved to a friendly name  
MyCategory/Topic - MyWebsiteName

> [@Heliosurge](#):
>
> My final shortened link is handy as it also prevents an issue if the client changes domain name breaking the links.

Regarding the shortened link…

> [@Heliosurge](#):
>
> ```plaintext
> [This topic post#1](/t/
> /257646)
> 
> ```

I love that feature! I was worried that if someone was to right click and copy the link it would copy `/t/ /257646` but it will actually still copy the entire URL which is great for those who right click and share outside of the forum. Win-Win :).

Thanks for the tip!

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [March 9, 2023, 10:17pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/13 "2023-03-09T22:17:15Z")

</div>

You don’t need that newline; you can do e.g.:

```plaintext
[This Topic](/t/257646)

```

[This Topic](https://meta.discourse.org/t/257646)

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 9, 2023, 10:17pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/14 "2023-03-09T22:17:53Z")

</div>

> [@UnitedFreedom](#):
>
> Regarding the shortened link…
> 
> > [@Heliosurge](#):
> >
> > ```plaintext
> > [This topic post#1](/t/
> > /257646)
> > 
> > ```
> 
> I love that feature! I was worried that if someone was to right click and copy the link it would copy `/t/ /257646` but it will actually still copy the entire URL which is great for those who right click and share outside of the forum. Win-Win :).
> 
> Thanks for the tip!

This handy if your also considering a domain change as all links that use site domain in the l8nk will break. A client decided to change from “.ai” to “.com” had to fix some important links manually and any post with images still requored using the wrench to rebuild html o fix image displays in posts.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [March 9, 2023, 10:18pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/15 "2023-03-09T22:18:41Z")

</div>

> [@Heliosurge](#):
>
> A client decided to change from “.ai” to “.com” had to fix some important links manually

They should have used the `discourse remap` script - that’s what we do transparently when we have customers change their hostname.

---

<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: [March 9, 2023, 10:18pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/16 "2023-03-09T22:18:56Z")

</div>

> [@supermathie](#):
>
> This is kind of what I was wondering… since we exclude the site name from intra-site topic links, we may want to also exclude the site name from intra-site category links.

I agree, I feel its irrelevant to have the site name shown within the same site.  
Imagine if every Google Search result included `- Google` to the end of the title lol.

It is however useful to retain the site name for outside links though.

> [@supermathie](#):
>
> I should mention there’s another way of doing this that might suit you: #feature::category (`#contribute:feature`) gives you a direct link to the category.

That’s a very nifty feature (still requires the need to educate others who post on my website, but great for personal use…and those who actually read documentation lol).

I tried that on my website, but it just created a bolded **#Category** it does not include the nice folder icon. Is that a theme component?

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 9, 2023, 10:20pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/17 "2023-03-09T22:20:42Z")

</div>

> [@supermathie](#):
>
> > [@Heliosurge](#):
> >
> > A client decided to change from “.ai” to “.com” had to fix some important links manually
> 
> They should have used the `discourse:remap` rake task - that’s what we do transparently when we have customers change their hostname.

Well that would fall to me to complete. Thanks Now I know for future. What is the exact commandline or was that it? Still learning a lot. lol

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [March 9, 2023, 10:23pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/18 "2023-03-09T22:23:50Z")

</div>

> [@UnitedFreedom](#):
>
> I tried that on my website, but it just created a bolded **#Category** it does not include the nice folder icon. Is that a theme component?

I’m not sure? Maybe it is?

> [@Heliosurge](#):
>
> Well that would fall to me to complete. Thanks Now I know for future. What is the exact commandline or was that it? Still learning a lot. lol

I’d recommend this guide:

> [@Change the domain name or rename your Discourse](https://meta.discourse.org/t/change-the-domain-name-or-rename-your-discourse/16098):
>
> bookmark This guide explains how-to change the domain name of your Discourse site, and includes information about setting up DNS changes, editing configuration files, updating site settings, and correcting social logins and post content to reflect your new domain name. warning This guide is for self-hosted Discourse instances that were installed using our [installation guide on GitHub](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md). If you are [hosted by Discourse](https://www.discourse.org/pricing), please see [Configure your domain name for hosted Discourse](https://meta.discourse.org/t/configure-your-domain-name-for-hosted-discourse/21827) for specific …

---

<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: [March 9, 2023, 10:23pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/19 "2023-03-09T22:23:50Z")

</div>

> [@Heliosurge](#):
>
> This handy if your also considering a domain change as all links that use site domain in the l8nk will break. A client decided to change from “.ai” to “.com” had to fix some important links manually and any post with images still requored using the wrench to rebuild html o fix image displays in posts.

Oh, I switched my domains, but just did a remap function in the console which is basically Find & Replace all URL instances to the new domain to fix broken links.

This was the guide I followed: [Change the domain name or rename your Discourse](https://meta.discourse.org/t/change-the-domain-name-or-rename-your-discourse/16098)

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 9, 2023, 10:24pm UTC](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646/20 "2023-03-09T22:24:52Z")

</div>

> [@UnitedFreedom](#):
>
> That’s a very nifty feature (still requires the need to educate others who post on my website, but great for personal use…and those who actually read documentation lol).

Announcements at times can help with tops and tricks for users. I often do it the harder way before learning a new easier method. lol

[Next page](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646.md?page=2)
