2

I have noticed that the actual address for questions now involve the following string appended to the URL:

?noredirect=1&lq=1

So, here is a question that I was recently looking at:

http://stackoverflow.com/questions/168150/other-than-for-linq-queries-how-do-you-use-anonymous-types-in-c?noredirect=1&lq=1

I tried removing the ?noredirect... data and that link works to display the same page.

Also, there is a share link for the question as well. The link for the above question is quite different and smaller:

http://stackoverflow.com/q/168150/643828

This also goes to the same web page and long link, but without the ?noredirect... appendage.

So, my question is - of the three links described above - which is the preferred link for sharing and the one that will most likely persist over time?

2

2 Answers 2

5

Well, actually you can use all of them. The link generated by the share button under the question doesn't 'look nice', but it does make you eligible for the Announcer badge - the last part of the URL is your user ID.

The URL you see in the address bar includes the question's title, which is important for SEO reasons, but in fact it doesn't matter what the last part (after the question number) is. The following URLs all point to this question:

http://meta.stackoverflow.com/questions/335640/what-address-url-should-be-used-for-sharing-a-question
http://meta.stackoverflow.com/questions/335640/test
http://meta.stackoverflow.com/questions/335640/donald-trump-has-a-nice-haircut
http://meta.stackoverflow.com/q/335640/4751173
http://meta.stackoverflow.com/q/335640/test

The function of the noredirect parameter is to prevent automatic forwarding, as explained here. You might not experience this, but anonymous users visiting a duplicate question with no answer are forwarded to the dupe target automatically (they might not understand how duplicate questions work on Stack Exchange).

The lq parameter indicates that you visited via the 'Linked question' section. I'm not sure what's done with this but I guess it measures the effectiveness of this section. There's a related rq parameter for the 'Related questions'.

the one that will most likely persist over time?

That's almost impossible for us to answer, but given Stack Exchange's hatred for broken links, you can be sure that all link forms will be supported for a long, long time (6-8 centuries).

2
  • 1
    Just to add to the announcer badge - it is for external sharing. You don't get the badge for sharing the link on SO or MSO. Commented Oct 4, 2016 at 11:24
  • @psubsee2003 yes, for sharing a question link on Stack Exchange it is probably easier to copy the URL from the address bar, because it has a fixed location on your screen and the share link doesn't.
    – Glorfindel
    Commented Oct 4, 2016 at 11:35
8

Link generated by "share" button is the one to use for sharing.

Format: "q" or "a", followed by post id, followed by user id who shared the post (if you want to hide your identity for some reason you can remove that last optional part)

  • http://stackoverflow.com/q/39822979/477420 and
  • http://stackoverflow.com/a/39822893/477420 -

You must log in to answer this question.

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