While habitat is often a limiting resource for group-living animals, we have yet to understand what aspects of habitat are particularly important for the maintenance of sociality. As anthropogenic disturbances rapidly degrade the quality of many habitats, site-attached animals are facing additional stressors that may alter the trade-offs of moving or remaining philopatric. Here we examined how habitat health, size and saturation affect movement decisions of a coral-dwelling goby, Gobiodon quinquestrigatus, that resides within bleaching-susceptible Acropora coral hosts. To assess effects of habitat health, we translocated individuals far from their home corals into dead corals with the choice of adjacent healthy corals. To assess effects of habitat size and saturation, we manipulated coral sizes and the number of residents in healthy corals. Remarkably, 55% of gobies returned home regardless of treatment, 7% stayed in the new coral, and the rest were not found. Contrary to expectations, habitat factors did not affect how costs of movement influence group-living decisions in this species. These site-attached fishes preferred to home instead of choosing alternative habitat, which suggests a surprising awareness of their ecological surroundings. However, disregarding alternative high-quality habitat is concerning as it may affect population persistence under conditions of rapid habitat degradation.