All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is a difference of opinion among the scholars of Islam concerning a woman whose husband fails to appear and nobody knows his location.
According to Abu Haneefah and ash-Shaafi'i, such a woman is not allowed to marry until she makes sure of his death or of his separation from her.
This opinion is based on the narration of Al-Mugheerah that the Prophet said: “A woman whose husband is absent remains his wife until he returns.” Besides, Al-Haakim narrated from ‘Ali that he said: “An absentee's wife should not re-marry till she makes sure of his death or him divorcing her.”
According to the Hanbali and Maaliki schools of jurisprudence, a woman whose husband is absent should wait for him for four years, and then, observe 'Iddah (woman's prescribed waiting period after divorce or death of husband) for four months and ten days. After that, she is allowed to marry. But these schools differ concerning the manner in which he has been missing, over the period of four years.
In brief, if a woman married a second man believing that her first husband died due to his long absence, such as one killed in war, or drowned after the damage of his boat, or expired in a wild land, and then she waited for her missing husband for four years and observed the 'Iddah, then her marriage with the second man is valid. But, if the first husband returns and finds that his wife is married and has had intimate relations with her new husband, he is free either to take his wife – since she is still his wife – or to leave her to the second husband, who has to pay the Mahr (bridal gift) to the first husband.
Anyway, if the first husband wants to resume his family life with his wife, he has to wait till she gives birth if she is pregnant, or that she gets her monthly period and becomes pure. In case of leaving the wife to the second husband, should the marriage contract to him be renewed or not? The Muslim scholars differ about this issue. However, Imam Ibn Qudaamah in his book Al-Mughni, gives preponderance to the renewal of the marriage contract. In both cases, if the woman is pregnant, the newborn baby will be the son/daughter of the second husband.
There is a consensus among Muslim scholars that if a wife receives some news that proves that her husband is alive and it is possible to contact him, then she is not allowed to marry.
But if it proves that he has not left money to maintain her or she is afraid of committing adultery, then a judge can nullify the contract of marriage and she becomes free to re-marry, and her first husband has no choice.
On the other hand, if she marries knowing that her husband is still alive, or marries without the judge’s decision, then this last marriage is null and void.
Allah knows best.