27

I have found mentions of various Stack Exchange engine URLs (/question/NNNN, /question/NNNN/question-title-spelled-out, /answer/NNNN, /user/NNNN, /q/NNNN, /a/NNNN, /u/NNNN, etc.) scattered around in different places, including sometimes just-in-passing mentions that a link can also including a user id, /a/NNNN/UUUU or can have suffixes such as ?lastactivity or ?rq=.

Is there some unified location where all these sorts of URLs are documented?

(I did find https://api.stackexchange.com/docs which documents the somewhat-similar-looking API calls, but am trying to find documentation for the regular Stack Exchange engine website URLs instead.)

3
  • Nice question, I've been thinking for a while about asking something like "how many specifically coded URLS should link to a certain question/answer?" Commented Aug 15, 2019 at 0:34
  • I've added a rather long list for the 'core' Q&A functionality and user pages, since they are used most often. I realize I've skipped e.g. the Help Center, review pages, elections, and probably a dozen other topics. I'm not sure if those are really interesting and worth documenting, since they do not involve so many redirects/hidden parameters.
    – Glorfindel Mod
    Commented Aug 15, 2019 at 8:12
  • @Glorfindel, yes I was particularly interested in the "shortcut" URLs which redirect within the Q&A system, e.g. URLs that might be suitable for linking to a specific topic and/or answer on some external Wiki page.
    – Nathan
    Commented Aug 16, 2019 at 18:52

1 Answer 1

25

There is a List of unlinked pages on Stack Exchange sites but it only covers URLs you normally wouldn't find. I don't think there's a unified location document for 'public' URLs, so here's an attempt:

Questions

  • Canonical form: /questions/[question ID]/[question title]
    • Most links generated by the site itself have this form (e.g. question lists, sidebar widgets)
    • [question title] is not the full title if it's longer than 80 characters
    • What you type as [question title] doesn't matter; if you type something else, it'll still redirect to the canonical form (which exists for SEO purposes)
    • If you use an answer ID instead of a question ID, it'll still work and redirect to the canonical form (of the answer)
    • Parameters (here is an extended but not up-to-date list, these are the ones I see the most):
      • lq=1: visited from the Linked Questions sidebar widget
      • rq=1: visited from the Related Questions sidebar widget
      • noredirect=1: prevents redirection to original question in the following cases:
      • lastactivity: links to the last activity (edited post, new answer) on the page
      • cb=1: visited from the Community Bulletin (sidebar widget with Meta posts and blog links)
      • r=SearchResults: visited from a search results page. In this case, a parameter s=[rank]|[relevance] is added as well; see here for more details.
      • answertab=[sort], where [sort] is one of active, oldest, votes, makes sure the right sort is set (regardless of the user's current choice). Often combined with a #tab-top fragment to scroll down to the answers.
  • Short form: /q/[question ID] or /q/[question ID]/[user ID]
    • This is the link you get by clicking the share link underneath a question; the user ID is the one currently logged in, not the author. It makes sure the link counts for the Announcer badge and its kin.
    • If you use an answer ID instead of a question ID, it'll still work and redirect to the canonical form (of the answer)
    • If you use the ID of a tag wiki or excerpt, e.g. https://meta.stackexchange.com/questions/62883, it will redirect to the tag info page.
  • An obscure form, used in the newsletter: /landing/r/newsletter?cta=question&id=[question ID]

Answers

  • Canonical form: /questions/[question ID]/[question title]/[answer ID]#[answer ID]
    • This is basically an extended version of the canonical question URL; again, only the question ID and the last answer ID matter (the latter because it scrolls the page to the right position).
    • The first answer ID matters if there are too many answers to fit on a single page; it makes sure the correct page is displayed.
  • Short form: /a/[answer ID] or /a/[answer ID]/[user ID]
    • If you use a question ID instead of an answer ID, it'll still work and redirect to the canonical form (of the question)
    • The global inbox uses this format (with noredirect=1) when somebody posts an answer to one of your questions.

Posts / revisions

  • Edit post: /posts/[post ID]/edit
  • Revision history: /posts/[post ID]/revisions
    • Can be visited via the 'edited x hours ago' link underneath a post, but works when there is only a single revision too.
    • The global inbox uses this format for notifications that one of your posts has been edited.
  • Single revision (rendered): /revisions/[post ID]/[revision number]
  • Edit post, starting from a particular revision: /posts/[post ID]/edit/[revision GUID]
  • Single revision (markdown): /revisions/[revision GUID]/view-source
  • Timeline: /posts/[post ID]/timeline

Comments

  • Canonical forms:
    • /questions/[question ID]/[question title]#comment[comment ID]_[question ID]
    • /questions/[question ID]/[question title]/[answer ID]#comment[comment ID]_[answer ID]
    • Most of the remarks about questions and answers applies here, too
  • Short form: /posts/comments/[comment ID]
    • This format (with a noredirect=1 parameter) is used in the global inbox.

Users

  • Most URLs support current instead of a user ID. This will automatically be populated with the user who is currently logged in, so e.g. /users/current will redirect to your own user page.
  • Canonical form: /users/[user ID]/[display name]
    • What you type as [display name] doesn't matter; if you type something else, it'll still redirect to the canonical form (which exists for SEO purposes)
    • For your own user (for ♦ moderators, all users), this shows the Activity page; for other users, the Profile page
    • Navigation is possible with
      • the tab parameter (for the top tab: Profile / Activity and the second Activity tab (Summary / Answers / Questions etc.)
      • the sort parameter (for subtabs; sometimes it does affect the sorting, e.g. answers by votes or by creation date; sometimes it's just an additional filter, e.g. with votes)
      • the page parameter
  • Short form: /u/[user ID]
  • Flag summary: /users/flag-summary/[user ID]
    • Normally only works on your own user ID; ♦ moderators can view other users' flag summaries as well.
  • Edit profile page: /users/edit/[user ID]
    • Normally only works on your own user ID; ♦ moderators can edit other users' profiles and some of the subpages as well.
    • Edit subpages have their own URL structure, e.g. /users/email/settings/[user ID] for the email settings and /users/delete/[user ID] for the 'Delete account' page.
  • Deleted posts: /users/deleted-questions/[user ID] and /users/deleted-answers/[user ID]
    • Normally only works on your own user ID; ♦ moderators can view them for other users as well.
18
  • 1
    Great, thanks, very helpful. Just curious how you came to know about all of these? Was it just making a mental note of URLs you noticed as you used the system over a period of time, or was there some more direct route to compiling this information?
    – Nathan
    Commented Aug 16, 2019 at 18:48
  • 4
    ... let's just say I spend too much time here ...
    – Glorfindel Mod
    Commented Aug 16, 2019 at 18:52
  • As an example, while researching for this answer I stumbled upon the /posts/comments/ short form. I never knew it existed, until I checked a few obvious places to look for system generated URLs.
    – Glorfindel Mod
    Commented Aug 16, 2019 at 19:34
  • Just a check: on /users/recently-deleted-questions a mod sees the same as the user or do they get to see all deleted questions?
    – rene
    Commented Nov 6, 2019 at 11:02
  • They see the same as the user; they'd have to use the search functionality (user:12345 deleted:1 is:q) to see all deleted questions.
    – Glorfindel Mod
    Commented Nov 6, 2019 at 11:06
  • Don't forget the timeline.
    – Mast
    Commented Nov 6, 2019 at 12:40
  • @Mast that link is already mentioned in the List of unlinked pages.
    – Glorfindel Mod
    Commented Nov 6, 2019 at 12:41
  • So is /revisions, yet you mentioned that in your post. That's kind-of where I expected /timeline too. Oh well, at least it's indirectly mentioned. Very nice feature.
    – Mast
    Commented Nov 6, 2019 at 12:43
  • But /revisions is not an unlinked page (unless there is only a single revision). So it belongs here but not in the other post :)
    – Glorfindel Mod
    Commented Nov 6, 2019 at 12:45
  • Ah, gotcha. The 'problem' is indeed with the other answer, not with yours.
    – Mast
    Commented Nov 6, 2019 at 12:46
  • Interesting that a link to an answer from the search page ends with something like https://meta.stackexchange.com/questions/44063/stack-overflows-robots-txt-is-completely-useless/44082?r=SearchResults&s=1|13.2247#44082 (I searched for blab) The s=1|13.2247 part is undocumented and seems to be (based on other tests) s=<position_in_results_page|<matching_ratio>. Commented Apr 15, 2020 at 7:51
  • @fedorqui'SOstopharming' interesting, that s parameter appears for me only after I've clicked the link. Might be worth a question by itself ...
    – Glorfindel Mod
    Commented Apr 15, 2020 at 7:56
  • Oh, the link to the answer in meta.stackexchange.com/search?q=blab does not have the s parameter to you? I checked with private window and normal one and it always does to me. Commented Apr 15, 2020 at 8:00
  • 1
    @fedorqui'SOstopharming' nope: i.sstatic.net/3OM6V.png Related discussion: meta.stackexchange.com/q/242925/295232
    – Glorfindel Mod
    Commented Apr 15, 2020 at 8:06
  • For comments, there are also magic links, e.g. [edit], [mcve], [reprex], [repro], [mre], [example], [tag:tag-name], [meta-tag:tag-name], [meta], [main], [help], [tour], [so], [mathoverflow.se], and [chat]. Rendered (not all work in this special place, but they work on the normal sites): edit, [mcve], [reprex], [repro], [mre], [example], tag-name, tag-name, [meta], [main], help center, tour, Stack Overflow, MathOverflow, and Meta Stack Exchange Chat. Commented Jun 13, 2020 at 16:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .