The first Qiblah (Al-Aqsa Mosque) was built 4000 years after Adam. I need clarification from the Quran, Hadeeths (narrations) and Tafseer (exegesis) regarding the direction to which people prayed during those 4000 years.
All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Al-Aqsa mosque was the first Qiblah (direction of prayer) for the Muslims. It was their Qiblah around 13 years before the Hijrah (migration) during the Makkan Era and for 17 months during the reign in Madeenah after Hijrah. It was also the Qiblah for some previous nations.
However, Al-Suyooti and Al-Shawkani stated in their Tafseer (interpretation of the Quran) that Prophet Aadam used to pray towards the Ka'bah (Al-Haram Mosque).
Saying that Al-Aqsa was built 4000 years after Aadam is a claim that needs evidence.
It is confirmed in Saheeh Al-Bukhari and Saheeh Muslim and others that Abu Tharr narrated that he asked the Prophet "O Prophet of Allaah, what was the first mosque to be built on earth? The Prophet replied: "Al-Haram mosque." Then I asked, "Which one was the second mosque?" He replied: "Al-Aqsa mosque." Then I asked, "How many years were between them? He replied: "40 years".
It is documented in the book of biographies and history that Masjid Al-Haram existed at the time of Aadam . So this is evidence and is reported by Al-Bayhaqi in the Sunan.
So if it is confirmed that Al-Haram mosque existed at the time of Aadam then the construction of Al-Aqsa mosque would be during or shortly after his time.
Moreover, it is said that the Haram mosque was built by angels.
Another report states that Al-Haram Mosque was built by Adam . Then he was ordered by Allaah The Almighty to go to Al-Aqsa to build the mosque, so he built it and devoted himself to the worship of Allaah The Almighty. This is stated by Al-Suyooti in Sharh Sunan Sahih An-Nasaa'i, and by Ibn Hajar in Fath Al-Baari.
Nevertheless, Ibn Hajar and Al-Ayni stated in Sharh Saheeh Al-Bukhari that both mosques were built by the angels and were re-built afterwards, by prophets and other people.
Allaah Knows best.
You can search for fatwa through many choices