# How do I link to a question in another question or in comments section?

I have read this question How do I reference another question and is it OK to post a question as a comment/answer on another question that relates to that question. but I do not think it addresses my problem correctly.

My question is How can I insert a link to a question I previously did or someobody else's when writting a new question or in the comments section?. What I'm doing now is just copying it straight from the URL bar in my navigator but it looks that only displays correctly when I create a new question but not in the comments where it is shown as an url page.

I'm looking a more easier to do tag which I can customize with words my own words such as how it is done in bbCode or in html code. Can this be done?

• Does this help? – Theoretical Economist Apr 13 '18 at 2:26
• Do you want to ask that how to insert hyperlink in comments, for example like this : This is Doraemon – Jaideep Khare Apr 13 '18 at 2:30
• @TheoreticalEconomist It is a nice article, but I'm looking at suggestions on how to avoid errors when trying to display links. So far looks that I maybe can try URL syntax as I'm more familiar with it. But does it works on comments section?. It looks to take up much space from characters allowed in there. – Chris Steinbeck Bell Apr 13 '18 at 2:31
• @JaideepKhare Yes how to insert hyperlinks and some tips on how to save space when inserting them in comments section as the characters are limited. – Chris Steinbeck Bell Apr 13 '18 at 2:32
• The page I linked to in my previous comment should explain how to insert hyperlinks. As for saving space, you could use a URL shortener such as goo.gl or bit.ly. – Theoretical Economist Apr 13 '18 at 2:43
• @TheoreticalEconomist In terms of making self understood to others would it be okay to use a URL shortener?. I do not think I can change the name of the url tag when using those services. – Chris Steinbeck Bell Apr 13 '18 at 2:49
• Bitly allows you to change the URL tag. You can also just embed the link in text, like I have in my previous comments. No one needs to see the URL. – Theoretical Economist Apr 13 '18 at 2:51
• @TheoreticalEconomist I don't know how to change the URL tag with Bitly, but on visiting its website I found how to make a link but to customize it seems to be a pay service. – Chris Steinbeck Bell Apr 13 '18 at 3:00
• Since people are bringing it up: the use of link shorteners is heavily discouraged. – J. M. isn't a mathematician Apr 13 '18 at 3:11
• Bitly URLs appear as bit.ly/randomtext. The randomtext part is randomly generated, but can be customised for free if you register. In any case, why are you interested in editing the URL? Just change the text to make the link informative. – Theoretical Economist Apr 13 '18 at 3:11
• @J.M.isnotamathematician Whoops, that I didn't know. Thanks for pointing this out! – Theoretical Economist Apr 13 '18 at 3:11
• It seems to me a bit unclear what is actually asked here, but this seems related: How do you cite a reference in a comment? – Martin Sleziak Apr 13 '18 at 4:31
• @TheoreticalEconomist I didn't know how to edit the text. Although I've found that using parenthesis does the trick which I was trying to do. – Chris Steinbeck Bell Apr 13 '18 at 18:47
• @MartinSleziak Actually pretty much of what my question was is covered in your answer. But it was basically how to write links as tags in html code. – Chris Steinbeck Bell Apr 13 '18 at 18:48
• The link in my very first comment explains how to edit the text. Did you even read it? – Theoretical Economist Apr 14 '18 at 2:09

It seems that you are asking two different things:

How to format links to a comment?

...that only displays correctly when I create a new question but not in the comments where it is shown as an url page.

You do not want to be link displayed like this: https://math.meta.stackexchange.com/questions/28234/how-do-i-link-to-a-question-in-another-question-or-in-comments-section but you want some specific text.

To achieve this you imply use text format, for example, [How do I link to a question in another question or in comments section?](https://math.meta.stackexchange.com/questions/28234/how-do-i-link-to-a-question-in-another-question-or-in-comments-section) - this renders as How do I link to a question in another question or in comments section?

This format can be also used in the posts. (In my opinion, it's preferable to just posting a link and rely on Stack Exchange software that it is going expand the link to the title. If you use your own caption, you have better control over the displayed text.)

For more details see: How do you cite a reference in a comment?

You can also find section on formatting comments in editing help. And also in some posts on Meta Stack Exchange, such as: How do I use formatting in comments?

How to get link to a post?

What I'm doing now is just copying it straight from the URL bar in my navigator but ...

In the case of this question you get: https://math.meta.stackexchange.com/questions/28234/how-do-i-link-to-a-question-in-another-question-or-in-comments-section link and this is a link to this answer: https://math.meta.stackexchange.com/questions/28234/how-do-i-link-to-a-question-in-another-question-or-in-comments-section/28235#28235 link. (After each link I will also add "clickable" version so that you can try it.)
Under every posts you get a link called share. You get a shorter link from there. The last part of the link is your user id - which you can omit if for some reason you don't want the link to identify who shared the link. (Or you might keep it, if you hope to get some of the badges related to sharing questions.) In this case you get https://math.meta.stackexchange.com/q/28234 link for the question and https://math.meta.stackexchange.com/a/28235 link is the link to the answer. (Both with userid omitted.) I will add that this link also links to the answer: https://math.meta.stackexchange.com/q/28234#28235 link.