SB 8.18.28

tat-pāda-śaucaṁ jana-kalmaṣāpahaṁ
 sa dharma-vin mūrdhny adadhāt sumaṅgalam
yad deva-devo giriśaś candra-maulir
 dadhāra mūrdhnā parayā ca bhaktyā
Synonyms: 
tat-pāda-śaucam — the water that washed the lotus feet of the Lord; jana-kalmaṣa-apaham — which washes away all the sinful reactions of the people in general; saḥ — he (Bali Mahārāja); dharma-vit — completely aware of religious principles; mūrdhni — on the head; adadhāt — carried; su-maṅgalam — all-auspicious; yat — which; deva-devaḥ — the best of the demigods; giriśaḥ — Lord Śiva; candra-mauliḥ — who carries on his forehead the emblem of the moon; dadhāra — carried; mūrdhnā — on the head; parayā — supreme; ca — also; bhaktyā — with devotion.
Translation: 
Lord Śiva, the best of demigods, who carries on his forehead the emblem of the moon, receives on his head with great devotion the Ganges water emanating from the toe of Viṣṇu. Being aware of religious principles, Bali Mahārāja knew this. Consequently, following in the footsteps of Lord Śiva, he also placed on his head the water that had washed the Lord’s lotus feet.
Purport: 

Lord Śiva is known as Gaṅgā-dhara, or one who carries the water of the Ganges on his head. On Lord Śiva’s forehead is the emblem of the half-moon, yet to give supreme respect to the Supreme Personality of Godhead, Lord Śiva placed the water of the Ganges above this emblem. This example should be followed by everyone, or at least by every devotee, because Lord Śiva is one of the mahājanas. Similarly, Mahārāja Bali also later became a mahājana. One mahājana follows another mahājana, and by following the paramparā system of mahājana activities one can become advanced in spiritual consciousness. The water of the Ganges is sanctified because it emanates from the toe of Lord Viṣṇu. Bali Mahārāja washed the lotus feet of Vāmanadeva, and the water with which he did so became equal to the Ganges. Bali Mahārāja, who perfectly knew all religious principles, therefore took that water on his head, following in the footsteps of Lord Śiva.