My 3x great grandmother is an interesting case of illegitimacy, and this is how I handled it until DNA more or less proved that I had it right;
She was born in 1868 as Lizzie Wade Rimes, daughter of Elizabeth "Betsey" Rimes. No father named on the certificate, but the middle name 'Wade' gives a clue to her parentage. Two months later, banns are read for the marriage of Isaac Wade and Elizabeth Rimes, but the marriage does not actually take place until exactly a year later, in a register office!
Isaac and Elizabeth have twelve more children together. But Lizzie, the eldest, never actually takes Isaac's surname. She is a Rimes on her marriage certificate, and she also leaves her father's name a blank. The exception is in census records, where her name is Wade just like the rest of her family, but I assume that this is an oversight by the census enumerators.
I have a newspaper clipping which celebrates her 60th wedding anniversary, and she is called the daughter of Isaac Wade. Isaac himself had been dead for 28 years by that point, and her mother Elizabeth for twelve years.
In my tree, I have always had her father as being Isaac Wade, and I have traced the Wade family backwards from him as if they were definitely my direct ancestors. Part of the reason I believed this to be true was that I have photos of them both, and in my opinion there is a definite resemblance. In fact, she probably looks the most like him out of all her 'legitimate' siblings, since she is robustly built just like him, whereas the others are slim and sharp-featured like their mother.
Upon taking a DNA test, I was delighted to see one of my living Wade cousins as a match with an estimated relationship that aligned with Isaac and Elizabeth being our mutual ancestors, rather than just Elizabeth.
What would I have done if this wasn't the case? I would still have kept Isaac and his family as my ancestors, but would leave a note somewhere that Lizzie is a step-child.