A person born in lawful marriage is said to be the legitimate child of the spouses. So the main point in case of legitimacy of a child is marriage between his or her parents.
Special notes regarding the Presumption of Legitimacy
1. A child born within six months after the marriage – the child is Illegitimate unless the father acknowledges the child.