The Rulings of Prayer: The Qiblah (Direction of Prayer)
The Kaʿba -which is located in Mecca- is the Qiblah of all Muslims, the direction towards which all Muslims must perform their prayers; otherwise their prayer is invalid.
Therefore, one should find the direction of the Qiblah before starting the prayer.
There are four ways to determine the direction of Qiblah:
However, in the case a Muslim is not able to determine the Qiblah through any of these ways, they should choose one direction and perform their prayer.