asp.net mvc - Mvc URI Structure: ID or Name -


i working on application provide information events, , wondering best way structure uri resources is.

the easiest way use id each event; such as;

baseurl/events/{eventid}

the issue id not known customer. prefer have more like;

baseurl/events/{eventname}

perhaps more important reason doing seo purposes. if targeting keyword event, surely more beneficial have event name in url?

my issue using event name it’s not ‘parseable’ id, in becomes sensitive event name changes etc. adding spaces uri means customers aren’t explore typing resource names in, , again lead parsing issues.

what standard practice in area? using id norm, or using resource name? if take wordpress example, know postname can act resource identifier, know @ least 1 instance of name being used.

go hybrid approach, how stackoverflow built: use id in url internal usage , append name afterwards readability , seo.


Comments