Distribution of magnetic ions in a semiconducting host is critical for the functionality of diluted magnetic semiconductors. By investigating the temperature- and field-dependent magnetization of single-phase polycrystalline ZnO:Co oxides, the substitution of Co at the Zn site is found not to occur randomly but Co ions appear to have a tendency for aggregation via oxygen with an antiferromagnetic coupling, in contrast to paramagnetic isolated free Co. The experimental findings are justified through first-principles density functional calculations based on the generalized gradient approximation. It suggests that Co dopants in ZnO:Co have a tendency towards staying close to each other along the ab plane.