Sahih al-Bukhari, Book 25, Hadith 199 (In-Book)

Narrated Ibn `Abbas: The Prophet was asked about a person who had his head shaved before slaughtering (his Hadi) (or other similar ceremonies of Hajj). He replied, "There is no harm, there is no harm."

حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ حَوْشَبٍ، حَدَّثَنَا هُشَيْمٌ، أَخْبَرَنَا مَنْصُورٌ، عَنْ عَطَاءٍ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ قَالَ سُئِلَ النَّبِيُّ صلى الله عليه وسلم عَمَّنْ حَلَقَ قَبْلَ أَنْ يَذْبَحَ وَنَحْوِهِ‏.‏ فَقَالَ ‏ "‏ لاَ حَرَجَ، لاَ حَرَجَ ‏" ‏‏.‏

sunnah.com