Praise be to Allah.
The one who cuts his hair should make it all the same length. The one who cuts his hair on the sides of his head more than the middle comes under the heading of qaza’, which is forbidden. Al-Bukhari (5921) and Muslim (2120) narrated from Ibn ‘Umar that the Messenger of Allah (blessings and peace of Allah be upon him) forbade qaza’. Nafi’ (one of the narrators of the hadith) said, explaining qaza’ : Shaving part of a boy’s head and leaving part.
Al-Nasai (5048) and Abu Dawud (4195) narrated from Ibn ‘Umar that the Prophet (blessings and peace of Allah be upon him) saw a boy part of whose head had been shaved and part of it left. He told them not to do that and said: “Shave all of it or leave all of it .” Al-Albani classed it as sahih in Sahih al-Nasai.
That includes cutting some of the hair short and leaving some.
It says in Fatawa al-Lajnah al-Daimah (5/175):
What is the ruling on leaving some of the hair longer than the rest?
Abu Dawud narrated from ‘Abd-Allah ibn ‘Umar (may Allah be pleased with him) that the Messenger of Allah (blessings and peace of Allah be upon him) forbade qaza’ and said: “Shave all of it or leave all of it.”
It says in Sharh al-Iqna’:
“Qaza’ includes shaving some places on the sides of the head, or shaving the middle and leaving the sides, as most of the Christians do, or shaving the sides and leaving the middle, as many of the foolish do, or shaving the front and leaving the back. Ahmad was asked about shaving the back of the head and he said: This is the action of the Magians, and whoever imitates a people is one of them. Thus it is known that it is not permissible to leave some parts of the hair longer than others.” (‘Abd-Allah ibn Ghadyyan, ‘Abd al-Razzaq ‘Afifi, Ibrahim ibn Muhammad Al al-Shaykh)
Shaykh Ibn Jibrin (may Allah preserve him) was asked: It has become common among women and men to cut their hair in such a way that there is an area that is 10 or 13 cm long, then they shave the hair on the sides and back of the head completely, leaving only the hair on the top of the head.
What is the ruling on that and what is the evidence? Does this come under the heading of qaza’ or not? Why?
“There is no doubt that this action is wrong and is blind following of others, and it comes under the heading of qaza’. It was narrated that the Prophet (blessings and peace of Allah be upon him) forbade qaza’; he saw a boy who had part of his head shaved and he said: “Shave all of it or leave all of it.” Moreover, this style is not beautification for either men or women, rather it is changing the creation of Allah and spoiling people's appearance, and it is an imitation of the West in which there is no benefit, in addition to the cost involved, as it involves a lot of effort and spending money on something that is harmful, as is well known. We advise men not to adopt this western style and we advise women to stick with that which their mothers and grandmothers did, of letting their hair grow and braiding it, as this is more beautiful. And Allah is the one whose help we seek; may Allah send blessings and peace upon Muhammad and his family and Companions.” (Fatawa al-Shaykh Ibn Jibrin)
Shaykh Muhammad al-Mukhtar al-Shanqiti (may Allah preserve him) said:
“The one who cuts the hair on the sides of his head and makes the hair thick in the middle of the head is included in this, because this is imitating immoral people . Some of the scholars (may Allah have mercy on them) referred to that. We know that some of our earlier shaykhs were very strict with regard to cutting some parts of the hair and not others, and they regarded that as coming under the heading of qaza’ and they said: Either cut all of it or shave all of it. This is the basic principle we should follow, according to the scholars. The Sunnah with regard to hair is to shave all of it or cut all of it, not to cut some of it and leave some of it, because this is an imitation of corrupt people.”(Sharh Zad al-Mustaqni’”
And Allah knows best.