As indicated by the religious conventions recorded by J. Gordon Melton, the first Siva sanctuary at Somanath was manufactured at some obscure time before. The second sanctuary was fabricated at the same site by the Seuna rulers of Vallabhi around 649 CE. In 725 CE, Al-Junayd, the Arab legislative head of Sindh, who attacked different parts of Gujarat and Rajasthan, is said to have wrecked the second sanctuary. The Gurjara-Pratihara lord Nagabhata II is said to have developed the third sanctuary in 815 CE, a vast structure of red sandstone.
As indicated by history specialists, the first undeniable sanctuary was assembled by the Solanki lord Mularaja at some point before 997 CE, despite the fact that a few students of history trust that he may have revamped a littler before sanctuary. Be that as it may, the site of Somnath had been a journey site from antiquated times by virtue of being a triveni sangam (the joining of three streams — Kapila, Hiran and the legendary Sarasvati River). Soma, the Moon god, is accepted to have lost his radiance because of a condemnation, and he washed in the Sarasvati River at this site to recover it. The outcome is the waxing and melting away of the moon, undoubtedly a reference to the waxing and winding down of the tides at this ocean shore location. There is no authentic record of a sanctuary wrecked by Al-Junayd. On the other hand, Nagabhata II is known not went to tirthas in Saurashtra, including Someshvara (the Lord of the Moon) at the site, which might be a reference to a Siva sanctuary.
Somnath sanctuary, 1869
In 1024, the sanctuary manufactured by Mularaja was pulverized by the conspicuous Afghan ruler, Mahmud of Ghazni, who struck the sanctuary from over the Thar Desert. The sanctuary was remade by the Paramara ruler Bhoja of Malwa and the Solanki lord Bhimdev I of Anhilwara (now Patan, Gujarat) somewhere around 1026 and 1042. This seems to have been a wooden structure, which was supplanted by a stone sanctuary by Kumarpal (r.1143-72).
In 1296, the sanctuary was by and by decimated by Alauddin Khilji's armed force. Raja Karan of Gujarat was crushed and compelled to escape. As per Taj-ul-Ma'sir of Hasan Nizami, the Sultan bragged that "fifty thousand unbelievers were dispatched to damnation by the sword" and "more than twenty thousand slaves, and cows past all figuring fell under the control of the victors."
The sanctuary was revamped by Mahipala Deva, the Chudasama ruler of Saurashtra in 1308 and the Linga was introduced by his child Khengar at some point somewhere around 1326 and 1351. In 1375, the sanctuary was at the end of the day crushed by Muzaffar Shah I of the Gujarat Sultanate. In 1451, the sanctuary was at the end of the day devastated by Mahmud Begada, the Sultan of Gujarat.
By 1665, the sanctuary, one of numerous, was by and by requested decimated by Mughal sovereign Aurangzeb. Later the sanctuary was remade to its same magnificence contiguous the destroyed one. Later on a joint exertion of Peshwa of Pune, Raja Bhonsle of Nagpur, Chhatrapati Bhonsle of Kolhapur, Queen Ahilyabai Holkar of Indore & Shrimant Patilbuwa Shinde of Gwalior reconstructed the sanctuary in 1783 at a site nearby the destroyed sanctuar