All perfect praise be to Allah, The Lord of The Worlds; and may His blessings and peace be upon our Prophet Mohammad and upon all his family and companions.
The above Hadith is graded as Hasan(good) by some of the scholars. Abu Dawood has narrated it in his Sunan after Abu Umamah(May Allah be pleased with him) who reported that the Prophet(PBUH) said, " If anyone goes out from his house after performing ablution for saying the prescribed prayer in congregation (in the mosque), his reward will be like that of one who goes for hajj pilgrimage after wearing ihram (robe worn by the hajj pilgrims). And he who goes out to say the mid-morning (duha) prayer, and takes the trouble for this purpose, will take the reward like that of a person who performs umrah. And a prayer followed by a prayer with no worldly talk during the gap between them will be recorded in Illiyyun." Based on this Hadith, the Shafi scholars have excluded the Duha prayer from the supererogatory prayers that should be performed at home, and that it is better to perform it in the mosque solely.
It was stated in "Tohfat Al-Mohtajj," a Shafi book, "It is better to offer supererogatory prayers at home as indicated by the following Hadith of the Prophet (PBUH), who said, "O people! perform your (voluntary) Salat (prayers) in your homes because the best Salat of a man is the one he performs at home, except the obligatory Salat."
Moreover, offering it at home averts a Muslim from showing off (of good deeds) and blesses his home and family.
This rule doesn't apply to Duha prayer, the two Rak`as of Tawaf(circumambulation around the Kabah), Ihram from a Miqat where there is a mosque and the supererogatory prayer of the person who arrives early for the Friday prayer."
Ibn Hajar, a Shafi scholar, said, "The Sunnah is to perform the Duha prayer in the mosque based on the above Hadith.
Therefore, it isn`t among the supererogatory prayers that should be offered at home." Other scholars have stated that it is better to offer the Duha prayer at home. According to them, the above Hadith means, as al-Mulla Ali al-Qari says, "It applies to the person who doesn`t have a dwelling, or whose dwelling is occupied and the like. In addition, the Hadith hasn`t mentioned the mosque in the first place. It refers to the person who got out of his home, marketplace, or business to offer the Duha prayer, leaving worldly matters behind his back."
We, the Iftaa` Department, rule in line with the Shafi Mzhab(School of Law) as indicated by the above Hadith. Allah knows best.