Local adaptation is defined as a genotype-by-environment interaction for fitness such that home genotypes have higher fitness than foreign genotypes (Kawecki and Ebert 2004). Local adaptation is common but not ubiquitous (Leimu and Fischer 2008, Hereford 2009) and often difficult to detect in host-parasite systems because parasites may be better adapted to host populations from the recent past than to contemporary host populations (Koskella 2014). The scale of environmental heterogeneity relative to gene flow is one factor determining whether populations adapt to local conditions, evolve generalist strategies (Slatkin 1973, Penczykowski et al. 2016), or specialize on a single environment (Brown and Pavlovic 1992). For example, local adaptation is favored when the size of habitat patches is larger than the characteristic scale of gene flow, while smaller habitat patches may favor adaptation to the average of environments encountered, due to the unpredictability of environments inhabited by offspring (Slatkin 1973). This pattern is readily apparent from empirical studies of host-parasite metapopulations, where the scale of parasite adaptation to local host genotypes depends strongly on habitat configuration and relative scales of gene flow (Thrall and Burdon 1997, Thrall et al. 2002, Laine 2005, Koskella et al. 2011, Tack et al. 2014). However, it is unclear how local adaptation in metapopulations scales up to determine species distribution and abundance (Peterson et al. 2019).