# In a component, how do I find out the base URI of the forum?

**URL:** https://meta.discourse.org/t/in-a-component-how-do-i-find-out-the-base-uri-of-the-forum/370106
**Category:** Development
**Created:** [June 13, 2025, 5:29pm UTC](https://meta.discourse.org/t/in-a-component-how-do-i-find-out-the-base-uri-of-the-forum/370106 "2025-06-13T17:29:12Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [June 13, 2025, 8:59pm UTC](https://meta.discourse.org/t/in-a-component-how-do-i-find-out-the-base-uri-of-the-forum/370106/3 "2025-06-13T20:59:14Z")

</div>

Where do you want to use it?

The Reddit-ish theme, for example, uses `discourse/helpers/base-path` in the template to create the “the category list” link in the welcome message on the right.

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

> <https://github.com/discourse/discourse-redditish-theme/blob/01cf318072cb5aeff176bdf78083cf46592ccdcc/javascripts/discourse/components/sidebar-welcome.gjs#L6>

> <https://github.com/discourse/discourse-redditish-theme/blob/01cf318072cb5aeff176bdf78083cf46592ccdcc/javascripts/discourse/components/sidebar-welcome.gjs#L41>

> <https://github.com/discourse/discourse-redditish-theme/blob/01cf318072cb5aeff176bdf78083cf46592ccdcc/locales/en.yml#L5-L5>

There are also examples where `discourse/lib/get-url` is used to get the URL in a JavaScript function.

---

_[View the full topic](https://meta.discourse.org/t/in-a-component-how-do-i-find-out-the-base-uri-of-the-forum/370106)._
