There is no doubt the zina ( fornication) is a heinous sin that a Muslim must not commit. Allah the Almighty blocks all ways that lead to this immoral crime. Thus, we find Him saying:

And come not near unto adultery. Lo! it is an abomination and an evil way.” ( Al-Israa 71:32)

As a result of this crime, children (coming through zina). According to some scholars could bear the names of their fathers.

Zeinab  Al-`Alawani, instructor of fiqh and Islamic studies, Graduate School of Islamic and Social Sciences, stated,

“The best option is for the people that committed zina is to repent sincerely to Allah and get married; therefore the child will be normally attributed to both of them as they will be lawfully married. If this is not an option or is unfeasible, then the man should try his best to save the child and raise him taking full responsibility of him as he is the one that biologically begot it.”