use mongoDB ObjectID in query parameter, does it affect SEO?

- 1 answer

Ad

if we use object id of mongodb in query parameter like for example,

in browser url,

http://example.com/get-details/507f191e810c19729de860ea

to pass this objectID from one state to another state, I am using $stateparam

then,in $http the url will be

"/get_details?id="+$stateParams.detail_id

$http.get("/get_details?id="+$stateParams.detail_id).then(...);

if there any problem with the url in browser in terms of SEO, i.e, http://example.com/get-details/507f191e810c19729de860ea what could be the solution

Ad

Answer

Ad

It's OK to use MongoDB Object ID as a primary key in a URL, in terms of SEO.

Also please consider including a slugified title along with the Object ID in the URL:

http://example.com/detail/<Object-ID>/<Slug>

It makes the URL more readable and helps search engines to determine the content of your page.

Ad
source: stackoverflow.com
Ad