356

Is there a permalink I can use for answers/comments?

migrated from stackoverflow.com Apr 5 '10 at 22:15

This question came from our site for professional and enthusiast programmers.

  • 2
    possible duplicate of meta.stackexchange.com/questions/156/… – Ladybug Killer Apr 6 '10 at 9:12
  • @dave no it's not a bug. Period. – Shadow Dec 30 '15 at 17:29
  • @Mon why not a rollback? – Shadow Dec 30 '15 at 17:29
  • @sha because I didn't look into the history; I just saw what seemed to be mistagging and fixed it. – Monica Cellio Dec 30 '15 at 17:32
  • @ShadowWizard most people believe there are things called usability bugs. Call them what you will; this is one of those. Exclamation mark. 😉 – Dave Abrahams Jan 2 '16 at 15:55
  • @Dave feel free to start a new bug report then, and have the team decide, but no matter what changing such a support question to bug report is not proper. Thanks for understanding! – Shadow Jan 2 '16 at 15:58
399

Yes, there's a "share" permalink for each answer to a question (and for each question as well).

It's right next to the "flag" and "edit" links at the bottom of the answer:

screenshot

  • 38
    How could I have missed that. :) – Kriem May 22 '09 at 16:02
  • I just noticed that too, that the "share" to social networking sites AND the "link" text are all rolled up into the "share" text. It used to look like this meta.stackexchange.com/a/101026/160875 Not sure how I missed that either! – Ellie Kesselman Oct 6 '12 at 10:45
  • 11
    "link" would be clearer. I wonder how many views this page has had since the change. – A.M. Jul 3 '13 at 0:36
  • 4
    agreed. I came here because I thought "share" would take me to some social networking site. "link" would be much more accurate. – ggutoski Jul 16 '14 at 16:23
  • 6
    The problem is with longer answers. Looking for a link we would expect to find it high, at the top of the answer. But the "share" control is at the bottom of the answer. For a one-liner like in the example, it is intuitive. But for a 100-liner, it is not. – Douglas Held Feb 18 '15 at 22:44
  • 1
    @DouglasHeld +1 Man, that’s dismal for discoverability. – Dave Abrahams Dec 30 '15 at 16:49
  • @ggutoski: the "share" tab seems to be called that because in addition to the link, it does also include options for sharing on social media. – sumelic Jan 4 '16 at 3:58
  • Like this? meta.stackexchange.com/a/45598/250904 : ) – shapiro yaacov May 17 '16 at 9:24
  • 2
    The URL created by the share button also includes your UserId. You can safely remove this if you don't want your Id to be shared. – Phillip Ngan Feb 16 '17 at 19:48
  • "share edit flag"; top or bottom; link or share: The implemented solution seems "good enough"; it hasn't been changed; the community seems to be getting used to it, even if it is an oddity. On the other hand, this remains difficult to find, until learning about the oddity. FWIW. – BaldEagle Jun 18 '18 at 15:09
  • Stackoverflow, are you listening? THIS IS BAD UI EXPERIENCE – Purplejacket Nov 20 '18 at 17:07
37

Permalink for questions/answers can be copied from the box shown after clicking the "share" link as shown below

enter image description here

Permalink for the comments can be obtained by copying the address of the link that shows the Time/Date of posting the comment as shown below

enter image description here

  • 11
    +1 for also explain the comment link :) – albciff May 21 '15 at 11:42
  • 1
    You can copy the address (i.e., ‘‘Copy shortcut’’ or ‘‘Copy Link Location’’) of the “share” link, too. (That’s slightly less manual motion than click-copy-close.) – Scott Jul 19 '17 at 19:10
  • It'd be no surprise if something has changed since 2014. In Jun 2018, this link takes me to a "revisions" page. While interesting and valuable, that page isn't the intended target of this discussion. FWIW. – BaldEagle Jun 18 '18 at 15:14
31

Recursive answer!

3

I will just add a few comments on various formats of the link to an answer:

  • As explained in other answer, you can get a link by clicking on share. Notice that if you do this while logged in the link contains your user id at the end - in my case I get: https://meta.stackexchange.com/a/45598/183484. The link works as well without user id and if you do not want it there you can simply remove it and you still get a working link: https://meta.stackexchange.com/a/45598 https://meta.stackexchange.com/a/45598 (This is useful if you do not want the link to reveal your identity. If you do not care much about badges, there is not actually much difference between using the two links.)
  • By clicking on some link to answer you get link in address bar which has the following format: https://meta.stackexchange.com/questions/45597/how-can-i-link-to-a-specific-answer/45598#45598 How can I link to a specific answer? The advantage of this is that it contains also question id and it is at least partially human readable. (In fact, you can replace the part how-can-i-link-to-a-specific-answer by pretty much anything, as long as you keep it a valid url.)
  • Quite often when I include a link in a post on Stack Exchange or in chat, I use [text](url) format. For example: [How can I link to a specific answer?](https://meta.stackexchange.com/q/45597#45598) How can I link to a specific answer? or [jp2code's answer](https://meta.stackexchange.com/questions/45597/how-can-i-link-to-a-specific-answer/45598#45598) jp2code's answer, etc.1 I will add that I obtained the first link using the bookmarklet "Formatted link to a webpage" from this page (Internet Archive). Personally, I find it quite useful - by one click it creates a formatted link, where the title of the post is included. (Or if some part of the page is selected, it is included is text.)

In case of link rot, I will copy here also the source of the above bookmarklet:

t=window.getSelection().toString();
if (!t && document.querySelector('h1')) {
  t=document.querySelector('h1').textContent.replace(/ \[closed\]| \[on hold\]| \[duplicate\]/g,'').trim();
}
else if (!t) {
  t=document.title.split('-')[0].trim(); 
}
u=window.location.href;
if (typeof StackExchange!=='undefined' && u.indexOf('area51')==-1 && /^[qa]/.test(u.split('/')[3])) {
      u=window.location.protocol+'//'+window.location.hostname+'/q/'+window.location.pathname.split('/')[2]+window.location.hash;
}
window.prompt('Copy to Clipboard','['+t+']('+u+')');

1Stack Exchange quite often expands bare link to the question title. But this is not always reliable. And in this way you have a better control over the text.

  • About "Notice that if you do this while logged in the link contains your user id at the end": It'd be no surprise if something has changed since Jan (it'd be good!). In Jun, I don't see my user id. On the other hand, the link goes to a Revisions page, which isn't the intended destination of this discussion. – BaldEagle Jun 18 '18 at 15:19
  • @BaldEagle That is strange. When I click on share, I do see my userid at the end of the url. For example, for this answer I get: https://meta.stackexchange.com/a/305392/183484. – Martin Jun 18 '18 at 15:39
0

Use the share button if you want to link to a specific answer.

If you'd like to link to a comment, copy the URL of the timestamp.

linking to Stack Overflow

  • Existing answers already cover both post share links and comment timestamp links. – Monica Cellio May 4 '18 at 1:13
  • Understood, for demonstration purposes mainly – Shane Gramlich Jun 21 '18 at 16:45

You must log in to answer this question.

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