Its known distribution covers coastal areas of Anglesey, south Wales, south-western England, the Channel Islands, through France to Galicia and northern Spain.
Less commonly, the plant grows in dune slacks and on sand or shingle beaches, as well as bedrock crevices with a submerged supply of freshwater from springs.
It does not appear to have any specific soil requirements and can grow in soil-free crevices in sedimentary or metamorphic rocks, as well as fine blown sand and shingle.
However, due to the dynamic nature of the coastal environment where it grows, R. rupestris individuals that do become newly established in a small area of suitable habitat may survive for only one or a few years before being eradicated.
[7] It is susceptible to outcompetition by vigorous perennials such as Phragmites australis and Rubus fruticosus and therefore relies on regular coastal erosion and physical habitat disturbance to suppress stronger competitors, thereby allowing sufficient recruitment to seedlings.
The plant can also withstand grazing by cattle, sheep, and horses, and this may provide an ecological benefit by preventing succession from open to closed vegetation.
Threats include tourism pressures, cliff consolidation, construction of coastal defense works such as seawalls, marine pollution from oil spillage, sewage or fertilizer run-off, and possibly increased storminess through climate change.
[3] The first full species action plan for shore dock was prepared in 1999,[8] most of which has since been executed by Plantlife, Natural England, the Centre for Ecology and Hydrology, the Countryside Council for Wales, and the National Trust.
[3] Although it is a rare species, shore dock has a range of life history traits that make it highly adapted to a physically disturbed habitat and harsh environmental conditions.