Terrestrial predators on marine shores benefit from the inflow of organisms and matter from the marine ecosystem, often causing very high predator densities and indirectly affecting the abundance of other prey species on shores. This indirect effect may be particularly strong if predators shift diets between seasons. We therefore quantified the seasonal variation in diet of two wolf spider species that dominate the shoreline predator community, using molecular gut content analyses with general primers to detect the full prey range. Across the season, spider diets changed, with predominantly terrestrial prey from May until July and predominantly marine prey (mainly chironomids) from August until October. This pattern coincided with a change in the spider age and size structure, and prey abundance data and resource selection analyses suggest that the higher consumption of chironomids during autumn is due to an ontogenetic diet shift rather than to variation in prey abundance. The analyses suggested that small dipterans with a weak flight capacity, such as Chironomidae, Sphaeroceridae, Scatopsidae and Ephydridae, were overrepresented in the gut of small juvenile spiders during autumn, whereas larger, more robust prey, such as Lepidoptera, Anthomyidae and Dolichopodidae, were overrepresented in the diet of adult spiders during spring. The effect of the inflow may be that the survival and growth of juvenile spiders is higher in areas with high chironomid abundances, leading to higher densities of adult spiders and higher predation rates on the terrestrial prey next spring.