I recently had my daughter and at first did not know who the biological father was. After doing a non legal test against one, I figured out the other is the father. I haven't informed him of the results yet. He had not been around most of the pregnancy and him and his family constantly harrassed me to get an abortion. I just want my daughter to have the best possible life and I know being around them is not what's best. He is not on the birth certificate and hasn't yet reached out to me for information on the child but his mother has. What can I do to protect her from them.
There is no way to "insure" that you maintain (or obtain) legal sole custody, but, with the help of an experienced lawyer, you can get a custody judgment that takes into account the best interest of the child.
Unfortunately, when you had his child you lost the right to decide that your child would be better off without him or his family.
The best thing you can do, now, to "protect your child from them" is to be a good mother.
That means realizing that your child has a father, and a life of her own. Being a parent is the process of that child taking over control of their life.
Of course, there are many things that concern you about him and his family. And, those things will be concerning to the court as well.
Currently, as you are not married and the child has not been formally acknowledged, he does NOT have any rights. And, unless he goes to court, he won't get any.
His time to file to establish his rights starts when you tell him he's the father. Or, possibly from when he has reason to believe that he is the father.
There is no easy answer as this is not an easy situation.
As the prior answer said, at some point, he may file to establish paternity and to set custody and visitation. if that happens, contact an attorney IMMEDIATELY. Do NOT go to court without meeting with an attorney.
In the meantime, you have a tough decision about what is best for child. Just know that his attorney will ask you about these decisions in front of the judge, so be sure you can look the judge in the eye and say "I am a good mother. I decided XYZ because that is what is best for my child".
If he is the biological father, he can force you into a paternity test, to add his name to the birth cert and to fight you for custody, as can his parents. If you are served, IMMEDIATELY hire an attorney. Stay off social media.