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

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

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

 [My Category - My Website Name](
1 Like

Yeah it can be hard when multiple roots have value.

A theme-component you might like for sharing content externally as links can be quite long. Is Share Link Shortener

1 Like

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.

Your right. I did know how to use…

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 (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.

1 Like

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: feature (#feature) gives you a direct link to the category.


This will be of interest for you and other users


Share link shortener

Excellent suggestion for both Category link and tags.

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

Regarding the shortened link…

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!

1 Like

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

[This Topic](/t/257646)

This Topic


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.

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


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.

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?

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

1 Like

I’m not sure? Maybe it is?

I’d recommend this guide:


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

1 Like

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

1 Like

True! In my specific circumstance, my userbase is very technically challenged. They barely know how to end a phone call, use google, use bold (they often end up bolding nothing, or everything), have never used a forum before, etc. So I am trying my absolute hardest to streamline all processes within Discourse, and hide every element that may overwhelm or confuse them.

Its a humbling experience lol

This is why I was looking for an automatic solution to exclude - My Website Name being appended to category links rather than adding more education pieces. :smiley:


Wel the link chain I posted is decent of you want to skip typing dome markdown code. Automates it a bit and could be easier for novice users

1 Like

this feature was also a nifty surprise when I first stumbled across it:

Peek 2023-03-09 17-33

if you have a link in your clipboard and paste on top of selected text, it’ll turn it into a link


Too bad it doesn’t work on mobiles — and with mobiles I mean at least iPad.