Should the ID Come Before or After the Title in an SEO URL?

ProcrustesPR

If you want a page to remain accessible when the end of its URL is cut off, consider placing the ID before the title—but the website must be able to look up pages by ID and accept incomplete titles. This is the practical reason better supported by the available discussion, not evidence of a ranking advantage. The discussion does not establish that either ID placement provides extra SEO weight or that adding .html at the end improves rankings.

ProcrustesPRProcrustesPRDoes my website need a speed score of 100?

Putting the ID first may preserve it when a URL is truncated

One difference between /695/title-goes-here and /title-goes-here/695.html is whether the ID survives when the end of the URL is cut off. Participants noted that URLs may lose their trailing portions because of storage length limits or user error. If the ID comes first, the application may still be able to identify the intended page.

  • ID first: Even if some of the title text is missing, 695 may remain intact, allowing the application to look up the content.
  • ID last: If the truncated portion includes the ID, the application may fail to identify the page, return an error, or identify different content instead.

This advantage has a clear prerequisite: the website must support lookup by ID and be able to handle an incomplete title. Simply swapping the ID and title in the URL does not automatically make the website tolerant of truncation. A participant mentioned that the page hosting the discussion had redirected an incomplete URL to the correct one. That describes how this particular page worked; it does not mean all websites behave the same way.

Both formats have support, but not all the reasons are about SEO

Another participant considered both ID placements workable and suitable for search engine optimization. The discussion therefore does not establish that only one arrangement is correct. Still, this is an opinion expressed in a public discussion, not an official search engine guarantee or a ranking test result.

Someone else intuitively preferred putting the ID first because, to them, the middle of a URL represents the content hierarchy while the final segment represents the actual content. This is a preference for how a URL reads, not proof that search engines give more weight to an ID placed earlier. When choosing a format, consider readability, how the application identifies pages, and any ranking differences as separate questions.

Do not mistake tolerance of truncation for a ranking boost

As for whether putting the ID last and adding .html is better, the available discussion offers no direct comparison of that extension’s effects or ranking data for the two ID positions. It cannot establish that either option provides extra SEO benefits. A lack of evidence also does not prove that the two options have identical effects.

Based on these discussions, if you want content to remain accessible after the end of a URL is cut off, consider putting the ID first and confirm that the application supports this behavior. If you put the ID last, there is also insufficient evidence to conclude that this format is worse for SEO.

ProcrustesPRProcrustesPRWill structured data improve rankings or AI citations?

ID placement in SEO URLs: perspectives from across the web

Which format makes it easier to reach the intended page if a URL is truncated?

If the website's application can look up pages by ID and accept incomplete titles, placing the ID first makes it more likely that identifying information will survive when the end is cut off. Participants noted that URLs may be truncated because of storage limits or by accident. However, if truncation also damages the leading ID, or the application does not support this behavior, the page cannot be expected to remain accessible.

If truncation is not a concern, does the ID have to come before the title?

Not necessarily. One participant considered both arrangements workable and suitable for SEO. Another intuitively preferred putting the ID first because they viewed the middle of a URL as the content hierarchy and the final segment as the actual content. That preference reflects how they read a URL; it is not based on a search engine ranking experiment or an official rule.

Does putting the ID first give it more weight, or is putting it last with .html more beneficial?

The available discussion does not establish that either approach provides an extra ranking benefit. Although one participant considered both ID placements suitable for SEO, the discussion offers no direct comparison of how ID placement or .html affects rankings. However, the lack of such comparisons does not prove that these approaches have identical ranking effects.

ProcrustesPRDo I have to buy backlinks for SEO?

References

  1. When is it worth it to make my URLs "pretty"?webmasters.stackexchange.com — Discusses: Which format makes it easier to reach the intended page if a URL is truncated?
  2. What is the best placement for the ID in a URL for SEO?webmasters.stackexchange.com — Discusses: Which format makes it easier to reach the intended page if a URL is truncated?
  3. Which URL format is better? example.com/[id]/title OR example.com/title/[id].htmlwebmasters.stackexchange.com — Discusses: If truncation is not a concern, does the ID have to come before the title?
  4. What is the best placement for the ID in a URL for SEO?webmasters.stackexchange.com — Discusses: If truncation is not a concern, does the ID have to come before the title?; Does putting the ID first give it more weight, or is putting it last with .html more beneficial?

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