The best and safest paternity test is to compare the fetus' DNA from the maternal blood as early as 8 weeks of the pregnancy. The mother's blood can be sent to a paternity testing center to test the maternal blood for the fetal DNA (NIPP=Noninvasive prenatal paternity test) and can then compare it to the father's DNA to establish paternity.  

After birth, the umbilical cord blood of the baby can be used in blood DNA paternity testing also through a paternity testing center. 

To complete the paternity test, the father will also need to provide a sample, in addition to the baby's sample taken at birth. The fathers sample will have the DNA pulled from the sample as will the sample taken from the cord blood. After the strands of DNA are extracted, the loci (or DNA points) are matched.

Most professional DNA paternity testing facilities will use 16 loci points to match the DNA from the cord blood sample to the DNA from the father's sample. The more loci matches, the more likely the suspected father is the biological father of the child.

DNA testing is by far more accurate than other forms of paternity testing. The DNA test is considered 100% accurate in excluding a suspected father from biological parent status and 99.99% accurate in establishing loci matches between the baby and the father. This means the father tested would be 99.99% sure that he is the biological father of the baby tested.

Cord blood paternity testing is more expensive than postnatal testing but less expensive than prenatal testing. No matter how the sample is extracted, the DNA testing results will still be the same. So, the cord blood will be just as accurate as the cheek swab and the hair test as long as DNA testing and the same number of loci are used to establish the paternal parent.