Density‐dependent habitat selection theory was mainly tested on active foragers and therefore its applicability to trap‐building predators is poorly understood. The high sensitivity of trap‐building predators to changes in their physical environment, combined with their limited movement capability, can lead to habitat specialization, reducing their utilization of alternative habitats. We studied density‐dependent habitat selection in two pit‐building antlions, differing in their habitat utilization spectrum. The habitat generalist, Myrmeleon hyalinus, inhabits and performs equally well in both sand‐ and loess‐derived soils, although preferring the former, more productive coarse‐grained soils. In contrast, the habitat specialist, Cueta lineosa, only inhabits fine‐grained soils such as loess, while showing reduced foraging performance in coarse‐grained sandy soils. We allowed larvae to select between these two soils, while manipulating con‐specific density and initial stocking position. Irrespective of the initial stocking position, the number of M. hyalinus pits in the sand was positively correlated with the number of con‐specific pits in the loess, implying that this species is a density‐dependent habitat selector. Furthermore, these patterns of density‐dependence were consistent with the expectations of ideal pre‐emptive distribution (i.e., strong non‐linearity in the distribution of antlions between soils with increased total density), suggesting that interference competition largely dictates habitat selection in this species. In contrast, the habitat specialist showed constant habitat selectivity, as neither con‐specific density nor initial stocking positions influenced its habitat preference. Although mainly tested on active foragers, habitat selection theory can be applicable for trap‐building predators, demonstrating how mechanisms operating at the individual level influence spatial distribution patterns.