As for the funeral prayer that is done in the absence of the deceased, then it is not correct that it be performed. This is because it is an innovation to pray on someone in his/her absence when the deceased has already been prayed on by those living in their city.

Shaikh al-Albani rahimahullah said:

“Whoever dies in a land in which there is no one who can pray upon him while present, then this person is prayed on by a group of Muslims with a prayer of absentia due to the Prophet [ﷺ] praying for Najaashi. It was reported by a group of the Companions with some of them having additions in [the wording of their hadith] over others. I have gather the Ahaadith regarding it, then made them into one context in order to bring the benefit nearer. The wording of the Hadith is from Abu Hurairah (may Allah be pleased with him):

 إن رسول الله صلى الله عليه وسلم صلى الله عليه وسلم نعى للناس [وهو بالمدينة] النجاشي [أصحمه] [صاحب الحبشة] في اليوم الذي مات فيه: [قال: إن أخا قد مات (وفي رواية: مات اليوم عبد لله صالح) [بغير أرضكم] [فقوموا فصلوا عليه]، [قالوا: من هو؟ قال النجاشي] [وقال: استغفروا لأخيكم]، قال: فخرج بهم إلى المصلى (وفي رواية: البقيع) [ثم تقدم فصفوا خلفه] [صفين]، [قال: فصففنا خلفه كما يصف على الميت وصلينا عليه كما يصلى على الميت] [وما تحسب الجنازة إلا موضوعة بين يديه] [قال: فأمنا وصلى عليه]، وكبر (عليه) أربع تكبيرات

The Messenger of Allah (ﷺ) announced to the people [and he was in Madinah] that Najashi [Ashama] [The companion of Habasha] died, on the day which he died in. He said: a brother has died (in one version: today a righteous servant passed away) [in other than your land] [so stand and pray over him]. [They said: who is he? He said: Najashi] [and He said: seek forgiveness for your brother] He said: so he came out to the Mussalah (in one version: al-Baqi) [Then he (ﷺ) came forward and made those behind him into rows [two rows] [He said: we made rows behind him as we made rows for the deceased and we prayed over him like we prayed for the deceased] [and it was not considered a funeral except with a [body] placed in front of him] [He said: He (ﷺ) led us and prayed over him] and he made Takbir (over him) with four Takbeeraat”

Reported by Bukhari (3/90, 145, 155, 157,) Muslim (3/54) and the wording is his, Abu Dawood (2/68,69), Nasaai (1/265,280), Ibn Majah (1/467), Bayhaqi (4/49), Tayalisi (230), Ahmad (2/241, 280, 289, 348, 458, 479, 529) from the routes from Abu Hurairah”

Then the Shaikh quotes Shaikhul-Islam Ibn Taymiyyah rahimahullah saying:

“What is correct is that if a person who is absent dies in a land which he is not prayed over in, then he is prayed for in absentia [i.e. in the absence of] as the Prophet (ﷺ) prayed for the Najaashi because he died among disbelievers and he was not prayed over. If he is prayed over where he died, then he is not prayed over in absentia because the obligation for praying over him from the Muslims is dropped. The Prophet (ﷺ) prayed in absenia [at times] and he left it [at times]. So his action of doing so and leaving it off are Sunnah. This has [its own] topic, and Allah Knows best. [From] the three statements in the mathab of Ahmad, the most correct of them in this [issue] is [the need for] detail and elaboration

[See: Zaad al-Ma’ad (1/520-521)] [Ahkaam al-Janaaiz pg. 116-118]

Also Imam Ibn Qayyim rahimahullah said:

“And it was not from his guidance to pray for every deceased who passed away in absentia. For many people passed away who were absent and he (ﷺ) did not pray for them”

[Zaad al-Ma’aad (1/519)]

Shaikh al-Albani rahimahullah spoke the truth when he wrote:

“Then compare this with what many Muslims are upon today of prayer upon every absent deceased individual, especially if he has high reputation, even if it is only from a political aspect and he is not known for righteousness or for serving Islam. Even if he dies in the Haram Makki where thousands joined to pray upon him in the Hajj season while the body is present for the prayer. Compare [this] to what we mentioned regarding the likes of this prayer and you will know with certainty that it [this action of praying in absentia] is an innovation which is not doubted by a Scholar of his (ﷺ) Sunnah and the mathab of the Salaf may Allah be pleased with them”

[Ahkaam al-Janaaiz pg. 120]

And Allah Knows Best

Faisal Ibn Abdul Qaadir Ibn Hassan
Abu Sulaymaan