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.
A child born out of Zina (fornication and/or adultery) should be traced back to his/her mother and he/she has nothing to do with the man who committed Zina (fornication or adultery) with his/her mother, as we clarified in Fatwa 89082.
This is the ruling that we adopt here in Islamweb and it is the view of the majority of the jurists . However, some scholars are of the view that if the fornicator [or adulterer] demands that the child be traced back to him, then he is traced back to him. According to this opinion, it is permissible for this girl to be traced back to that man.
Nonetheless, it is possible for this girl to choose any general surname, like calling herself daughter of ‘Abdullaah, or daughter of ‘Abdur-Rahmaan and so forth in order to avoid being embarrassed, without mentioning that she was born out of wedlock. For more benefit, please refer to Fatwa 134703.
Besides, if a woman does not have a guardian, she may appoint a righteous Muslim man to be her guardian. Imaam Ahmad said: “If a woman appoints a righteous Muslim man to represent her in such a case, then it is permissible.” Therefore, if that man is a Muslim, she may appoint him to be her guardian in the marriage contract. However, if he is a non-Muslim, then she should appoint someone else because being a Muslim is a condition for someone to be a guardian of a Muslim woman.
Allaah Knows best.