Populations are at risk of extinction when unsuitable or when sink habitat exceeds a threshold frequency in the environment. Sinks that present cues associated with high-quality habitats, termed ecological traps, have especially detrimental effects on net population growth at metapopulation scales. Ecological traps for viruses arise naturally, or can be engineered, via the expression of viral-binding sites on cells that preclude viral reproduction. We present a model for virus population growth in a heterogeneous host community, parameterized with data from populations of the RNA bacteriophage Φ6 presented with mixtures of suitable host bacteria and either neutral or trap cells. We demonstrate that viruses can sustain high rates of population growth in the presence of neutral non-hosts as long as some host cells are present, whereas trap cells dramatically reduce viral fitness. In addition, we demonstrate that the efficacy of traps for viral elimination is frequency dependent in spatially structured environments such that population viability is a nonlinear function of habitat loss in dispersal-limited virus populations. We conclude that the ecological concepts applied to species conservation in altered landscapes can also contribute to the development of trap cell therapies for infectious human viruses.