If we use object id of MongoDB in query parameter like for example,

In browser URL,


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

then,in $http the URL will be



Is there any problem with the URL in browser in terms of SEO,

i.e, http://example.com/get-details/507f191e810c19729de860ea? If so then what could be the solution?

  • Let us know what server environment you're using so users can make suggestions. In the future, rather than cross-posting to another Stack Exchange site, flag the question on the original site (on Stack Overflow) to request that it be migrated to the other site. That way answers aren't spread out over two sites. This is the right site to ask these types of questions on by the way.
    – dan
    Feb 11 '16 at 6:47
  • I am using expressJS, MongoDB for Database, My client said the ObjectID of MongoDB is not good for SEO, I do not know much about SEO, Can someone educate me on that, Can I use ObjectID like this one '507f191e810c19729de860ea' Feb 11 '16 at 6:51
  • 1
    Sure, as pointed out on Stack Overflow, look up at the URL for this question, it has an ID string in it too, and you'll likely see it indexed in Google in a few minutes. The ID string in your URL is however pretty long, so some might chose to rewrite it so that visitors might relate to it better (i.e., to something they understand better). If you let us know what web server you're using (e.g., Node.js, Apache, etc...), and a URL you'd like to rewrite to (e.g., http://example.com/get-details/shoes), users might suggest how to do that.
    – dan
    Feb 11 '16 at 7:00
  • 1
    Sure, as long as it's a valid URL (i.e., it doesn't contain special characters in it), you're fine. Adding an identifiable word like "shoes" to the URL might result in users being more willing to click on it. We have a lot of questions here on URL rewriting should you need help with that.
    – dan
    Feb 11 '16 at 7:22
  • 1
    No problem, feel free to post other questions about webmastering here in the future.
    – dan
    Feb 11 '16 at 7:28

There is a great misconception that in order to have better SEO you must have a human readable URL written as a statement or as the page title. There is absolutely no issue with having a record ID number in the URL if that is the logical identifier for the content being displayed. There are many sites out there that use integers, and even GUID's in the URL to identify a file uniquely (in database driven systems). This is not an issue with SEO as SEO focuses on the value of the content. Yes the URL does play a part in the ranking but having a record ID number in the URL is not a huge issue against the value of the page content itself.

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.