Ants can particularly make for harmful pests, infesting human homes and reducing crop yields. The damage caused by ants and the efforts to mitigate the damage are hugely costly. Broad-spectrum insecticides are used most commonly; however, due to their negative side effects, there is increasing interest in nontoxic alternatives. One promising commercially available alternative is 2-hydroxybenzaldehyde, which is naturally produced by various arthropods as a means of chemical defense and effectively repels ants. Here we conduct a structure–activity relationship investigation, testing how different chemical modifications alter the repellence of 2-hydroxybenzaldehyde. We find that 2-methoxybenzaldehyde is considerably more effective than 2-hydroxybenzaldehyde at repelling the common black garden ant, Lasius niger. We next compare the most effective repellent chemicals against 4 particularly harmful ant species to confirm that the results obtained with L. niger are general to ants and that our results are relevant to mitigate the costs of ant damage.