Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Lately, I've seen many search results in the form of<id> and /a/<id> on Google. Why do I see these slug-less permalinks instead of the full URL?

For instance, a search for "google search max url length" gives instead of

google search result

For the record, it seems that Google has indexed 1.7M slugless questions and 3.2M slugless answers.

share|improve this question
up vote 17 down vote accepted

It was a simple mistake. The code that renders the head tags was refactored to support Twitter cards, that need the open graph equivalent of <link rel="canonical"/>.

The code to set the canonical URL was there, but in the wrong rendering section, so when the link was rendered, no value was yet present and nothing got written.

I've fixed it and it's now in the right place. Of course, it will take a little time for Google to catch up.

share|improve this answer
I still don't see <link rel="canonical"> in the source of (M)SO. Did you already publish the fix? – Rob W Oct 20 '13 at 14:45
No. that has not happened yet. – Sklivvz Oct 20 '13 at 14:46
@RobW It's now on meta, I'm letting it bake for a few to make sure it's not breaking stuff. – Sklivvz Oct 20 '13 at 14:53
@Sklivvz thanks for the explanation; I looked for the answer a good deal but wasn't phrasing it the right way I guess... – Toby J Oct 23 '13 at 16:02

I noticed something that might explain this behavior.

Somewhere between September 15 this year (2013) and September 23, the dev team removed the Canonical link element that used to be on all questions pages.

How I figured this? Here is an archived version of a question from September 15 and the same question eight days later - view the source of both to see the <link rel="canonical" ...> gone.

As for why it was removed I fear only a dev can answer. Maybe a simple mistake, maybe on purpose.

share|improve this answer
Nice work, detective! – Aaron Bertrand Oct 23 '13 at 15:34
@AaronBertrand yeah, time traveling detective! ;-) – Shadow Wizard Oct 23 '13 at 17:56

You must log in to answer this question.

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