Ibn Jarīr related:
“When the Prophet—may Allah bless him and grant him peace—saw the House, he would raise his hands and say: ‘O Allah, increase this House in honor, greatness, dignity, awe and goodness, and increase in honor and greatness those who honor and revere it by performing Hajj or ‘Umrah.’”
Whoever sees the House before entering the mosque may do this. Those who recommend this supplication recommend saying it upon seeing the House, even if that is after entering the mosque.
However, upon entering the mosque, the Prophet—may Allah bless him and grant him peace—began with circumambulation. Before that, he offered neither the prayer of greeting the mosque nor any other prayer. Rather, the greeting of the Sacred Mosque is to circumambulate the House. He—may Allah bless him and grant him peace—would also bathe before entering Mecca and spend the night at Dhū Tuwā, near the wells known as Ābār al-Zāhir. Whoever can conveniently spend the night there, bathe and enter Mecca by day should do so; otherwise, none of this is required of him.
Upon entering the mosque, he should begin with circumambulation, starting at the Black Stone. He should face it directly, touch it and kiss it if possible, without harming anyone by jostling to reach it. If he cannot kiss it, he should touch it and kiss his hand; otherwise, he should gesture toward it. He then begins circumambulating, keeping the House on his left. He need not go to the space between the two corners or walk sideways before beginning his circuit; indeed, doing so is not even recommended.
When touching it, he says: “In the name of Allah; Allah is the Greatest.” If he wishes, he may say: