2

I have the following URL view:

example.com/article/{slug}-{id}

If I change the title of the article, then the slug will also change so that there is no disagreement.

Please note that the article is searched by ID, that is, there will be no 404 error.

  • 2
    I always recommend putting the ID near the beginning of the URL path. Long URLs often get truncated in emails or by content management systems. When the ID is near the beginning, it doesn't get lopped off and you can automatically correct an entire class of broken links. – Stephen Ostermiller Dec 17 '18 at 3:09
  • @StephenOstermiller Thank you, very helpful advice. Is it good to change the "slug" in the URL when I changed title of the article? My friend said it is bad for seo. – Илья Зеленько Dec 17 '18 at 3:20
3

Check out the URL of this very post on Stack Exchange, it's a great example of SEO-friendly slug+id addressing:

/questions/119694/is-it-good-for-seo-to-change-an-articles-slug-when-changing-its-title

The slug changes whenever the question's title changes, and it poses no issue for SEO. The key, of course, is for your server to look the post up by id and always 301 redirect to the canonical URL (the URL with the article's most up-to-date slug).

  • 1
    What a good example was found. The idea with the 301 redirect did not occur to me, but it looks really wonderful. Thank you so much!!! – Илья Зеленько Dec 17 '18 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.