Mothers gain maternal rights over their children just by giving birth to them. Likewise, if a man is married to the mother when she gives birth, he is presumed to be the father. In that case, paternity is automatically established. But for unmarried fathers, there are a few extra steps. This post will go over those steps and how you can gain visitation rights.
For unmarried fathers, the best option is cooperating with the mother. If you are present during the birth and the child's early life, then you can affirmatively agree to be the father. Essentially all you do is sign a document that says you are the father and paternity is established. If you are unable to affirmatively prove paternity, then you must establish it via a DNA paternity test. Once paternity is established, you can submit to the court for a custodial order.
Custodial orders are given in two ways. First, if you and the mother agree and submit a joint parenting plan; second, if it is contentious, the court will decide the custodial arrangement. The simplest solution is if you and the mother agree on a parenting plan and submit it to the court. A parenting plan outlines your plans on how to raise the child; it assigns duties between both parents. You submit it, and the court reviews it to ensure it cares for the child before approving it.
If you cannot agree, then you go to court and present arguments. The court hears your positions and designs a custodial arrangement that will bind both of you.
If you are trying to establish paternity and gain custodial rights over your child, you may want to consult with a family law attorney. These are complicated issues, and an attorney can go over them with you and help you plot a course. Establishing custody over a child is a difficult, but not impossible, endeavor. There are several steps that you must complete, but it is all possible. The courts and common sense presume that children need both of their parents. Don't let anyone stop you from being a part of your child's life.