Optimising Discourse URLs

AI-generated summary

Optimising Discourse URLs

Katherine asks two questions regarding Discourse URLs:

  1. Why are random letters and numbers added within URLs?
  2. How to ensure topics remain in their corresponding URL structure after being assigned to a particular parent and child category?

IAmGav answers that the numbers in the URL represent the topic and post IDs. Activating the “fixed category positions” site setting allows for rearranging categories. However, Katherine notes that this doesn’t affect the URL structure of topics within those categories.

IAmGav further explains the URL structure for categories and topics. Falco states that it’s currently not possible to have the URL structure reflect the categorisation, but rather set as breadcrumbs in page metadata.

Jagster and j127 discuss the impact of URL structure on SEO, with Jagster suggesting it has no effect, while j127 acknowledges that content is just one of many on-site factors, and that changing the URL structure at this point could be more damaging.

Hi all,

I have a few questions regarding Discourse URLs.

QUESTION 1: Why are random letters and numbers added within URLs?

  • How can we create URLs without these additional subfolders?
  • From my SEO understanding, extra URL subfolders push the content further away from the root domain, which dilutes the authority in Google’s eyes. They also look more spammy/ are not good for UX or trust.
  • Examples:community.examplewebsite.com/c/category-name/10, community.examplewebsite.com/t/topic/2529/2

QUESTION 2: How do we ensure that topics which have been assigned a particular parent and child category, remain in that corresponding URL structure?

  • This is a huge SEO factor - the more relevant pages which sit within these categories and subfolders help build up authority and indicate to Google how much content sits within these categories. From my understanding, without the folder structure, each individual post URL just sits off the root domain and Google does not see it as categorised or see a hierarchy of related content
  • Example: topic 1 has been categorised within parent category 1 > child category 2 , but the URL structure does not reflect this, and the topic still sits off the root domain: community.mojo.so/t/topic-name/2529/2
  • The optimised URL structure should be: community.mojo.so/parent-category-1/child-category-1/topic-1/

Would be grateful for any insights (in Layman’s terms)!

Answer1: The Numbers are the topic id and then followed by the post id

Answer2 : activating the /admin/site_settings/category/all_results?filter=fixed_category_positions
will allow you to re-arrange categories

Thank you.

I’ve managed to arrange the categories within the forum, however then once a topic is created within a category, the URL structure does not reflect the categorisation (it doesn’t sit within the same URL folder structure). Do you know a way to ensure it sits within this?

Categories as displayed as https://meta.discourse.org/c/support/6

where support has an id of 6 and can also be referenced as https://meta.discourse.org/c/6

topics are displayed as https://meta.discourse.org/t/optimising-discourse-urls/204974/

where the topic id is 204974 and can also be referenced as https://meta.discourse.org/t/204974/

a specific post is displayed as https://meta.discourse.org/t/optimising-discourse-urls/204974/2

where the topic id is 204974 and the post id is 2 and can also be referenced as https://meta.discourse.org/t/204974/2/

That is not possible at the moment. All we do is set the category as breadcrumbs in the page metadata:

And there is another point: structure of URL has nothing to do with SEO. Only the content in that URL matters. SEO includes a lot of pure folklore that supports only selling pitches of SEO consults :wink:

I don’t think that matters any more. It would be far more damaging to traffic if the URL structure were changed at this point.

There is a lot of snake oil in the SEO industry, but it definitely works if done correctly. Content is just one of many on-site factors.