Find the furthest pages of a website I would like to find the two furthest pages of a big websites (+5millions pages).

(It's the degree of separation, the most links between the two pages)
This is a classic "graph database" question. I would do the following steps:-


Traverse all the pages using a webcrawler, or if you can interrogate the website server directly that may be qukcker. 
Ensure you keep all links between pages, for later use.
Put the web pages into a neo4j database with connections between the pages


This will allow you to be able to do the query of pages with the maximum number of steps, or pages most frequently linked to, etc.