The current halachic prohibition against ascending the Temple Mount originates in the Ottoman period.
For millennia, the site of the First and Second Temples has been the subject of a halachic (Jewish law) question: where are Jews permitted to walk on the Temple Mount? Rabbis agree that because of the sanctity of the Temple, Jews must not enter the area where the Temples stood. They differ, however, about where the Temples were located, and whether the prohibition applies to the specific site of the Temples, or to the entire Temple Mount.
The First and Second Temples were small buildings, about 50 meters square, which contained an inner sanctuary, the Holy of Holies, into which the High Priest entered once a year, on Yom Kippur. The Temple Mount is nearly 1,500 square meters, and entering the golden Dome of the Rock, a Muslim shrine, and its surrounding area – around 200 sq.m. – is forbidden.
It is recorded that Rabbi Moses ben Maimon (Maimonides/Rambam, 1135-1204) prayed on the Temple Mount at a synagogue that had remained from an earlier (pre-Crusader) period. Rabbi Moses ben Nachman (Ramban) wrote that he prayed on the Temple Mount when he arrived in Jerusalem in 1267.
The current halachic prohibition against ascending the Temple Mount originates in the Ottoman period and was restated during the Mandate period by chief rabbis Avraham Ha-Cohen Kook and Isaac Herzog, and halachic authorities like R’ Yisrael Meir Kagan (author of “Hafetz Hayim”). Their position was consistent with the Ottoman and British governments’ and Wakf (Islamic Authority) policy of excluding Jews from the Temple Mount and restricting access to and use of the Western Wall.