Should a question page’s canonical URL contain only the question ID?

ProcrustesPR

Using only the question ID can keep a canonical URL from changing when the title is edited, but the available information does not establish that this is the only correct approach or necessarily better for search rankings. In public discussions, one respondent supported this approach, while another tested a title edit and found that Stack Exchange’s canonical URL changed with the title at the time. The choice involves three separate considerations: whether the URL needs to stay fixed, whether it should include a readable title, and how old URLs are handled after a title change.

ProcrustesPRProcrustesPRDoes my website need a speed score of 100?

Keeping only the ID protects the URL from title changes

One respondent argued that the canonical URL should contain only the question ID, not the title. They explicitly noted that they were not a Stack Exchange employee and had no authority over the implementation. This was a design recommendation, not a platform rule.

As long as the question ID stays the same, an ID-only canonical URL does not need to change when the title is edited. However, URL stability and better search rankings are two separate issues; the respondent provided no comparison of how the two designs performed in search rankings.

A shared canonical URL is not necessarily a permanent one

Another respondent observed that the page specified the same canonical URL whether they opened the question through an ID-only URL, one with the original title, or even one with other descriptive text. They inferred that the canonical URL would always use the question’s original title.

But a separate test found that editing the question’s title also changed the page’s canonical URL, rather than leaving the original URL in place. The distinction between observation and inference matters here:

  • Different URLs sharing one canonical URL was an observation made at the time.
  • The claim that the canonical URL would never change, even after a title edit, was an inference that respondent had not verified.
  • The test involving a title edit did not support the inference that the original title was always retained.

These records come from specific discussions and do not establish that Stack Exchange still follows the same rules today.

Claims about ranking effects depend on how old URLs are handled

The respondent who supported ID-only URLs speculated that including the title might be intended to make search results display a URL containing the title. They also suggested that a canonical URL change caused by a title edit might have a slight effect on PageRank, but that the effect might be temporary.

The PageRank speculation had an explicit condition: the old URL must remain valid and point to the new canonical URL. The discussion provided no measurements, so it does not justify saying that title changes will definitely hurt rankings—or that they will definitely have no effect. The respondent who tested different URLs also cautioned that an old URL returning a 404 is a different situation from multiple URLs being handled properly.

Readability advice does not rule out numeric IDs

In a 2024 article, Semrush recommended keeping URL slugs short and readable, retaining only relevant information, and avoiding elements such as numbers that make URLs difficult to read. This is general URL advice, not a direct comparison of ID-only canonical URLs and those containing titles for question pages.

It therefore does not establish that question IDs should be excluded from URLs. An ID-only URL is one design option for keeping the canonical URL fixed; the available information does not establish a clear SEO advantage for either including or omitting the title.

ProcrustesPRProcrustesPRWill structured data improve rankings or AI citations?

Canonical URLs for question pages: perspectives from across the web

If the canonical URL includes the title, how should the words be separated?

Semrush’s general URL advice is to separate words with hyphens rather than underscores and keep the slug short, readable, and reflective of the page’s topic. This advice applies when choosing to include text in a URL; it does not compare the effectiveness of ID-only URLs with URLs that include titles for question pages, nor does it establish that either option ranks better.

ProcrustesPRDo I have to buy backlinks for SEO?

References

  1. SEO and Changeable-But-Optional URL'swebmasters.stackexchange.com — Source used in the article above.
  2. How to Use a SERP Preview Tool for Better Snippetswww.semrush.com · 2024-03-22T14:18:00Z — Discusses: If the canonical URL includes the title, how should the words be separated?
  3. SEO and Changeable-But-Optional URL'swebmasters.stackexchange.com — Source used in the article above.
  4. SEO and Changeable-But-Optional URL'swebmasters.stackexchange.com — Source used in the article above.

Related articles

Does my website need a speed score of 100?Will structured data improve rankings or AI citations?Do I have to buy backlinks for SEO?How Long Does It Take to Evaluate SEO Results?Why do I have keyword rankings but no customers?Where should I start if I want to do SEO myself?Should I rewrite or update an old article that does not rank?Are Google Maps rankings the same as website SEO?
ProcrustesPR
ProcrustesPR