My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Is it a good idea to reveal model IDs in the URL?

Chidi Williams's photo
Chidi Williams
·Jun 29, 2018

For example, if I have a product model, it is good enough to use /products/:id as the URL security-wise? Or do I need to create a special identifier for the URL like a slug?

Also, are there any special considerations for hashed IDs (as in MongoDB) over auto-incremented IDs (as in MySQL) for showing in the URL?