The physical environment occupied by group-living animals can profoundly affect their cooperative social interactions and therefore their collective behavior and success. These effects can be especially apparent in human-modified habitats, which often harbor substantial variation in the physical environments available within them. For nest-building animal societies, this influence of the physical environment on collective behavior can be mediated by the construction of nests-nests could either buffer animal behavior from changes in the physical environment or facilitate shifts in behavior through changes in nest structure. We test these alternative hypotheses by examining the differences in collective prey-attacking behavior and colony persistence between fence-dwelling and tree-dwelling colonies of Stegodyphus dumicola social spiders. Fences and trees represent substantially different physical environments: fences are 2-dimensional and relatively homogenous environments, whereas tree branches are 3-dimensional and relatively heterogeneous. We found that fence-dwelling colonies attack prey more quickly and with more attackers than tree-dwelling colonies in both field and controlled settings. Moreover, in the field, fence-dwelling colonies captured more prey, were more likely to persist, and had a greater number of individuals remaining at the end of the experiment than tree-dwelling colonies. Intriguingly, we also observed a greater propensity for colony fragmentation in tree-dwelling colonies than fence-dwelling colonies. Our results demonstrate that the physical environment is an important influence on the collective behavior and persistence of colonies of social spiders, and suggest multiple possible proximate and ultimate mechanisms-including variation in web complexity, dispersal behavior, and bet-hedging-by which this influence may be realized.