Heterogeneous indirect reciprocity promotes the evolution of cooperation in structured populations.