Tahiyyatul Masjid
Time of performance: This Salaat is performed to honour Allah Ta’ala upon entering the Masjid.
Number of Rakaats: 2 Rakaats upon entering the Masjid and before sitting down. Benefits: The Prophet (Peace be upon him) said: When anyone of you enters the Masjid, he should not sit until he has offered 2 Rakaats (of Nafl Salaat).”
(Bukhari, Muslim)Few Rules
*This Salaat is not to be performed at a Makrooh time. If one enters the Masjid and it happens to be a Makrooh time then recite only the following (4 times)
TRANSALATION: Purity belongs to Allah and praise be to Allah and there is none worthy of worship besides Allah and Allah is greatest After having recited this, recite Durood Sharif.
*Intention for this Salaat is to intend the performance of Tahiyyatul Masjid. *Tahiyatul Masjid is not restricted to two Rakaats. One may also perform four Rakaats. * If one enters the Masjid and the Farz congregation is in progress, then one should not perform Tahiyatul Masjid: the Farz Salaat in which one will join in will take the place of Tahiyatul Masjid as well. One will obtain the reward of Tahiyatul Masjid in this case even if intention was not made. * If, after entering the Masjid one sat down and thereafter performed Tahiyatul Masjid, the Tahiyatul Masjid will be valid although it is best to perform it before sitting. *If one visits the Masjid seven times a day, it will suffice if one performs Tahiyatul Masjid only once.
Ref: Nafl Salaah By Mufti A. H.Elias Page 2 & 3