the legal way is for husband to adopt the child.

Since you were not married at the time of the birth, you will have to file a CS-909. On that there is a section where the father and mother sign that states he is the BIOLOGICAL father of the child.