The site (Drupal 7) has regular nodes that are publicly visible via standard node alias (node/<nid>). I need to be able to create hidden (private) node aliases that are random (e.g., node/9s8d0a8z9d) which will allow the person who has the URL to access the node.

User who accesses the node via random node alias should not be able to see the node id in URL hence the required feature. The main purpose of private URL is to make them expirable. It's ok if user gets to know the node id by digging the site once it gets there, I need to make the node alias obscure just in the URL itself.

I can create multiple node aliases with path and pathauto modules but one of random aliases will eventually be set as default alias which will be visible as node URLs in views or in Content page which is not desired.

Are there Drupal modules that can provide this functionality?

  • 2
    "Security through obscurity", as this sort of thing is known, is a waste of time and should be avoided. Instead, concentrate on securing permissions so that only the right users can see the right nodes. You would have to change a lot to hide the node id, including core js, your theme, the path to edit the node, the canonical URL and short links of the page, and a bunch of other stuff depending on what contrib modules you have installed. I doubt there's an existing contrib module to do it as its an unusual request. Defer to the big guys - Facebook, Twitter, etc - all use unhidden numeric ids
    – Clive
    Aug 12, 2013 at 10:02
  • In this case the main purpose of private URLs is to make private URLs expirable, so that when the link is given to the user, he/she doesn't see the node id "with unarmed eye". It's ok if user gets to know the node id by digging the site, I need to make it obscure just in the URL itself.
    – maijs
    Aug 12, 2013 at 10:59
  • i use pathauto + [random:hash:sha256] in pattern
    – user35952
    Sep 8, 2014 at 13:23
  • pathauto provides the ability of generate automaticaly path and you can determin path by content type. I use this for this problem and if you want the ability to access random_path/edit, you need the subpath module
    – user35952
    Sep 8, 2014 at 13:53

1 Answer 1


There is different solutions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.