Extended radio sources are an important minority population in modern deep radio surveys, because they enable detailed investigation of the physics governing radio-emitting regions such as active galaxies and their environments. Cross-identification of radio sources with optical host galaxies is challenging for this extended population, due to their morphological complexity and multiple potential counterparts. In the first data release of the Low-frequency array (LOFAR) Two-metre Sky Survey (LoTSS DR1) the automated likelihood ratio for compact sources was supplemented by a citizen science visual identification process for extended sources. In this paper we present a novel method for automating the host identification of extended sources by using ridgelines, which trace the assumed direction of fluid-flow through the points of highest flux density. Applying a new code, RL-Xid, to LoTSS DR1, we demonstrate that ridgelines are versatile; by providing information about spatial structure and brightness distributions, they can be used both for optical host identification and morphological studies in radio surveys. RL-Xid draws ridgelines for 85 per cent of sources brighter than 10 mJy and larger than 15 arcsec, with an improved performance of 96 per cent for the subset >30 mJy and >60 arcsec. Using a sample of sources with known hosts from LoTSS DR1, we demonstrate that RL-Xid successfully identifies the host for 98 per cent of the sources with successfully drawn ridgelines, and performs at a comparable level to visual identification via citizen science. We also demonstrate that ridgeline brightness profiles provide a promising automated technique for morphological classification.