| Drupal
drupal find node id

Several times, our members have asked about finding the Node ID of individual pieces of Drupal content. The Node ID is the primary key in the database for Drupal content and it's useful in many situations.

If you don't have the Pathauto module installed, this information is easy to find. By default, the Node ID is directly in the URL of the content.

However, if you have the Pathauto module enabled (as most sites do) the Node ID can be hard to find. Here's the solution ...

  • Visit the content whose Node ID you want to find and look at the tabs. Here's an example of a node, with extra tabs provided by the Webform module:
Find the Node ID of Drupal Content
  • Hover your mouse over one of the tabs. In this example, we'll use the "Edit", but this technique should work for all tabs.
  • Down in the bottom-left corner of the browser, you'll see the URL for the link, and it contains the Node ID. In this example, the Node ID is 2.

Things to note:

  • I'm using Firefox in these examples.
  • Even though the URL for the "Edit" page is actually /content/sponsor-registration, the browser is showing you Drupal's original URL.

You can also use this trick on other parts of the site. For example:

  • Go to Structure > Content, you can see the original URL here by hovering over the "edit" link.

About the author

Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.