Praise be to Allah.
There are saheeh ahaadeeth according to which the Messenger of Allah (peace and blessings of Allah be upon him) enjoined offering the eclipse prayer and reciting dhikr and du’aa’s when the Muslims see an eclipse of the sun or the moon. The Prophet (peace and blessings of Allah be upon him) said: “The sun and the moon are two of the signs of Allah and they do not become eclipsed for the death or birth of anyone. But Allah sends them to make His slaves fear (Him), so if you see that, then pray and make du’aa’ until it is over.” According to another version he said: “So if you see that, then hasten to remember Allah and call upon Him and seek His forgiveness.” So he (peace and blessings of Allah be upon him) connected the command to pray, make du’aa’, remember Allah and pray for forgiveness to actual sighting of the eclipse and not to the reports of the astronomers.
What all the Muslims must do is adhere to the Sunnah and act in accordance with it, and to beware of everything that is contrary to it.
Hence we know that those who offer the eclipse prayer on the basis of astronomers’ reports are making a mistake and going against the Sunnah.
It should also be noted that it is not prescribed for the people who live in a country where the eclipse is not happening to offer the prayer, because the Messenger (peace and blessings of Allah be upon him) connected the command to pray etc to actual sighting of the eclipse, not to news from astronomers that an eclipse was going to happen, or to its happening in another country. Allah says (interpretation of the meaning):
“And whatsoever the Messenger (Muhammad) gives you, take it; and whatsoever he forbids you, abstain (from it)” [al-Hashr 59:7]
“Indeed in the Messenger of Allah (Muhammad) you have a good example to follow” [al-Ahzaab 33:21]
When the Prophet (peace and blessings of Allah be upon him) offered the eclipse prayer, when that happened in Madeenah and the people saw it, Allah said (interpretation of the meaning):
“And let those who oppose the Messenger’s (Muhammad’s) commandment (i.e. his Sunnah legal ways, orders, acts of worship, statements) (among the sects) beware, lest some Fitnah (disbelief, trials, afflictions, earthquakes, killing, overpowered by a tyrant) should befall them or a painful torment be inflicted on them” [al-Noor 24:63]
It is known that he was the most knowledgeable and most sincere of people, and that he was the one who conveyed the rulings from Allah. If it was prescribed to offer the eclipse prayer on the basis of astronomers’ reports, or when an eclipse occurs in another region that is only seen by the local inhabitants, then he would have said so and would have guided his ummah to do that. Since he did not say that, rather he said the opposite, and he told his ummah to base their actions on actual sighting of the eclipse, we know from that that this prayer is only prescribed for those who see the eclipse and in whose land it occurs. And Allah is the Source of strength.