All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
The mother of the child born out of Zina (fornication or adultery) is responsible for his guardianship, and if she is negligent without a valid reason, she is sinful in addition to the sin of Zina.
According to the Muslim scholars this child – either a boy or a girl – should be given a second name (a virtual father’s name) which corresponds to his/her circumstance, like Abdullaah or Abdur-Rahman which means in Arabic the slave of Allaah or the slave of the Most Merciful etc. such names are attributes (i.e. being a slave of Allaah) that apply to all people and are not peculiar to any of them. That is because all people are actually slaves of Allaah even if they are disbelievers.
This child should not be traced back to a particular family or a given man suggesting that he is his father while in fact he is not. For more benefit, please refer to Fatwa 98961.
In case the mother of this child disappeared, then it is the Muslim community who should take care of him, and this is a great act of worship by which one gets closer to Allaah. He should be raised on faith and good moral conduct. One should not be resentful to him and despise him because he was born as a result of an illegitimate relationship simply because he had nothing to do with the sin of Zina.
For more benefit, please refer to Fataawa 89082, 83408 and 84303.