Sorry if this has already been discussed, I find it extremely hard to find anything on this kind of forum, especially if you’re not sure what keywords to look for…
I was wondering what would be considered best practice when you need a stable URL for your data. In most examples on Contentful the slug seems to be used as an identifier, like example-com/news/this-is-my-article
. But this means that whenever someone changes the title (in case of a typo for example) the link will change and the old one becomes a 404.
I’d rather use some sort of ID in the URL and only add the slug as a visual cue for users, so both
example-com/news/421/this-is-my-article
and
example-com/news/421/xxxx
would point to the article with ID 421.
Problem here is that the unique ID generated by contentful looks like 28Bz7NkSvkrjuls9Wy9tyB which wouldn’t look very attractive in the URL. Is there a way to use a numeric ID that is unique, but also more pleasing to the eye?