# How To Redirect Pinned Topic To External URL?

**URL:** <https://meta.discourse.org/t/how-to-redirect-pinned-topic-to-external-url/125994>\
**Category:** Product Support\
**Created:** [August 16, 2019, 2:59pm UTC](https://meta.discourse.org/t/how-to-redirect-pinned-topic-to-external-url/125994 "2019-08-16T14:59:40Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![frtt](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frtt/32/150703_2.png) [@frtt](https://meta.discourse.org/u/frtt)\
**Post date:** [August 16, 2019, 2:59pm UTC](https://meta.discourse.org/t/how-to-redirect-pinned-topic-to-external-url/125994/1 "2019-08-16T14:59:40Z")

</div>

Hi, I want to display a pinned topic on my forum that when clicked will redirect to an external URL.

I have tried setting this up in the Permalinks settings, and with this javascript code

` `

`

```
    if(window.location.href === "https://x.com/1") 
    {
       window.location.replace("https://y.com/");
    }
</script>

```

and in both cases it doesn’t work when the topic is clicked on from forum. When clicked it loads the normal topic url.. but then if you reload the topic page while already on it, it will then redirect to the external URL 🤔
how can i make it work correctly, so that when someone clicks a certain topic it redirects to different URL?
Thank you, I’m enjoying discourse so far! 🙂`

---

_[View the full topic](https://meta.discourse.org/t/how-to-redirect-pinned-topic-to-external-url/125994)._
