Custom permalinks

There is a permalink tab under customize section in admin panel. I don’t know what does it exactly do. Can someone please explain it to me with a picture from that area? Because I have my discourse in Persian, and Persian translation of different fields in this section doesn’t make sense to me.




How can I programmatically create these permalinks? php code is preferred for me. is it possible?

I want to use discourse as a q&a platform in my educational app. My app has a structure like this:
So I want the users to be able to create new topics like this:
since this structure isn’t supported by discourse, I want to use this customized permalinks as a redirection tool to created topics. Is it a good idea?

You can use the API to create these. Create a permalink while the Network tab of your browser’s development tools is open to see how it works. You can find more details here:


There’s a post in the linked topic with an example:

Permalink.create(url: '/discussion/12345', topic_id: 987)

Let me add my 50 cents to the topic.If Discourse runs from folder, for example, then the permalink should contain folder at the beginning:

Old URL: external-filesrecord-sets
Permalink: forum/external-filesrecord-sets
Topic ID: 88 --> New URL: /forum/t/external-files-record-sets/88

Help, please! :slight_smile:

  1. How can one find out what the post/topic/category ID is, without using code?

  2. I’m trying to create redirects from the admin/permalink panel and I’m doing something wrong. Is anyone able to do one example with me in private?

I don’t know enough about permalink redirections to comment.

But you should be able to get category ids from

Thank you for the help.

I’m getting an error: {“errors”:[“The requested URL or resource could not be found.”],“error_type”:“not_found”}

This issue still remains. Would love to get some help here :slight_smile:

This doesn’t work.

It seems also that the problem with permalinks on my end is the RTL.

Some links include RTL and it causes issues.