Who built Al-Aqsa mosque in Palestine?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is reported by Al-Bukhari and Muslim from Abu Tharr that he said, “O Allah's Apostle! Which mosque was built first?” He replied, “Al-Masjid Al-Haraam”. I asked, “Which (was built) next?” He replied, “Al-Masjid Al-Aqsa (in Jerusalem).” I asked, “What was the period in between them?” He replied, “Forty (years).” He then added, “Wherever the time for the prayer comes upon you, perform the prayer, for all the earth is a place of worshipping for you.”
As for who built Al-Aqsa mosque, there is a disagreement among historians over that issue. Some say that it was built by Adam . Others say that it was built by Abraham .
Apparently, it was built by Ya’qoob ibn Ishaaq Ibn Ibraheem, may Allaah exalt their mention; Allah knows best.
As for Sulayman's building of the Al-Aqsa mosque, it was only a rebuilding and rehabilitation, not laying the foundation, as there were more than forty years between Prophet Ibraheem and Prophet Sulayman, may Allaah exalt their mention, and it is certain that Ibraheem built the Holy Mosque in Makkah and there were forty years between it and Al-Aqsa mosque as narrated in the sound Hadeeth cited above.
For more benefit on the reward for praying in the two Holy Mosques, please refer to Fataawa 190553 and 88852.
Allah knows best.
You can search for fatwa through many choices