Our new forum platform is pretty smart about permalinks. Edited topic titles and typos won’t interfere with forwarding. Shortening URLs is easy, and pointing users to a specific post (or place in time) in a topic is very straightforward. Here are some uses for permalinks:
- Bookmark or link to a category or tag topic list
- Bookmark or link to a topic list filtered using both a category and a tag
- Point to a specific moment in time in a topic
- Point to a specific post in a topic
- Save an advanced search using a variety of search terms
Discourse provides permalinks for categories, tags, topics, and posts. Permalinks for categories and tags are slightly different from topics and posts.
Category & Tag Permalinks
This is a typical permalink for a category:
This is a typical permalink for a tag:
Discourse category and tag permalinks contain these 4 parts:
||Top Level Category or Tag
||2nd Level Category
Type : ”c” denotes that it is for a category, and “tags” is for tags.
Top Level Category or Tag : This can either be the top level category or just the tag.
2nd Level Category : Optional, used only when filtering down to a 2nd level category, and not used when filtering by a tag
Topic & Post Permalinks
This is a typical permalink for a topic:
Discourse topic and post permalinks contain these 4 parts:
Type : ”t” denotes that it is for a topic. This is required for the permalink to resolve properly.
Topic Title : The title of the topic, as provided by the user. It’s there for SEO purposes and is not actually needed to get the visitor to the correct topic. Further down we refer to this also as the “friendly” name.
Topic ID : The topic’s serial number, and, consequently, the most important part of the permalink. This is needed to get the visitor to the correct topic.
Post # : Optional, denotes the post ID, takes the user to the specific post in the topic.
The most common type of permalink shared by users and staff is the one for topics and posts. Here is an example”
Let’s break this permalink down:
This permalink contains a SEO ”friendly” topic title. If the user were to edit their topic title and change it to something else, existing permalinks posted in the forums or shared outside of the forums will still forward, as expected. Example:
A user creates the topic “Watch Crossover Episodes of Several Series in Order”. which results in this permalink:
The user later decided to change the topic title to ”Watch Crossover Episodes in Order”, resulting in the permalink updating to:
As long as the Topic ID (in this case:
217412) is present, it doesn’t matter if someone uses the old permalink or the new one, the destination will be the same. When using old/outdated permalinks, Discourse will forward to the new one so users can see the different in their browser.
Pointing to a specific post or time
You can forward users to the first, last, or any post in-between in a topic.
/1 to the end of a topic permalink to point to the first post in the topic. Example:
/last to the end of a topic permalink to point to the first post in the topic. Example:
Post ID to forward users to a specific post in a topic. You can enter the post number manually, or copy/paste it by clicking the Share button or right-clicking on the date for the post.
IMG : permalinks 1
The resulting permalink to a specific post will look like this:
This also works with the shortened version:
If size matters when sharing permalinks in the forums, Slack, or elsewhere, you can remove the Topic Title and keep the permalink in tact. Example:
This also works when pointing to a specific post in a topic. Example:
Legacy URLs from Vanilla
Top & Latest
#Latest at the end of their URLs to point users to the top or bottom of the thread. Discourse does not use this method, and thus anything after the
# in legacy URLs from Vanilla were ignored in our migration to Discourse. With that stripped from the permalink, Discourse will by default send users to the top (first post) of a topic.
Specific post in a topic
Discourse is forwarding all legacy URLs from Vanilla that contain a reference to a specific post in the topic (such as
#Comment_907265) to the same place in the Discourse topic.
Permalinks in Vanilla that send users to a specific post in a topic look like:
In Discourse, the same permalink forwards to: