This story gives you more clarity.Link : http://ignca.nic.in/kmsh0003.htm
In the course of an indepth study of Saurath, a Scholastician village of Mithila, Bihar, which I was assigned as part of a larger project on Village India undertaken at the Indira Gandhi National Centre for the Arts, the generous villagers narrated the history of their village with three references, (i) Shiva Legends; (ii) Ramayana Legends; and (iii) Genealogical Legends. The description of Shiva legends as explained by the villagers is given below:
The earlier name of the village was Bhagirathpatti-gangapatti, - after the names of two great ancestors: Bhagirathdutta and Gangdutt Sharma. The two brothers were great devotees of Lord Shiva and scholars of eminence. After achieving academic excellence, the Dutta brothers made a visit to the famous Shiva Temple of the coastal region of Saurastra of present-day Gujarat and offered their prąyer to the lord. Lord Somnath was extremely pleased with their devotion and appeared in the dream of the king giving him instructions to appoint them as the chief priests of the Somnath Temple. The Dutta brothers did not break away from their roots in their native village. They purchased land measuring 145 acres surrounding it and established a new village after their names – Bhagirathpatti-gangapatti.
In the 11th century (1025 AD), Mohammad Ghaznavi plundered the temple of Somnath. Now the Lord again appeared in the dream of Dutta brothers and gave them instructions, to take His lingam away from Saurastra. They followed the instructions and with the lingam came down to their native village. They changed the name of the village from Bhagirathpatti-gangapatti to Saurastra, which later became distorted as Saurath, however they did not share the secret of Somnath with anybody. The lingam was kept in a marshy land on the bank of the river Kamla. The Dutta brothers ďied without telling the story of the lingam to anybody.
After 150 years, a saint, Fakirchand, started constructing a dharmashala there. All of a sudden at night, Lord Shiva appeared in his dream and told him the entire episode. He said how his men had hurt Him by breaking the upper most part of the lingam with an axe. The Lord said.
“I am Somnath Mahadeo of the coastal Saurastra. After the assailment of Mohammad Ghaznavi two religious sons of this village brought my lingam here on my instruction. This secret they did not share with anybody, as the fear of Mohammad Ghaznavi was prevalent in Mithila too. This compelled me to live in isolation in a marshy and bushy land. No devotee visits here to offer prąyer to me. Now, as you have started clearing this place, I am sure, the devotees of this and surrounding villages will once again take care of me.”
Fakirchand got up early in the morning and recollected his dream. To check the episode, he went to the site and found that his men had unknowingly hit the lingam of Somnath with their axe making it bleed profusely. In this way the existence of the Lord of Somnath was confirmed. A small temple was erected and facilities such as a well, a small flower garden, a pond etc were made for the devotees.