In virginia child custody laws unmarried do not automatically have the same custody rights as married parents. The mother typically has sole legal custody unless paternity is established. Unmarried fathers must establish paternity through legal processes, such as signing a voluntary acknowledgment of paternity or through a court order, to gain custody or visitation rights. Once paternity is established, the court will determine custody based on the child's best interests, considering factors such as the child’s needs, each parent's ability to provide for the child, and the existing relationship between the child and each parent.