I have traced back to a John McAllister born in 1856 in St Quivox, Ayrshire in Scotland. I have his marriage certificate which names both his parents (Thomas McAllister and Martha Strachan) however I also have his birth certificate that only names the mother and labels him as illegitimate. On his birth certificate he is named "John Strachan" but then amended to "Archibald Strachan". Archibald is Thomas's father's name.
He then appears in the 1861 census. Martha McKie (MacKie is the surname of a previous husband/partner) is named as head of the house with her two sons William McKie and John McAllister.
Thomas and Martha marry later in 1861.
He then appears on the 1871 census as Archibald McAllister (same age) but from then on the name Archibald is never seen again and he goes as John McAllister.
Does the fact that Thomas is named as the father on John's marriage certificate give any certainty or does it only indicate that is who he considered his father (or even believed was his father)?
Does the fact he is named "McAllister" in the census while his mother is listed as "McKie" give additional weight to Thomas being the father?
Obviously not even an explicit legal document tells if he really is the biological father - only that he claimed to be.
To make things slightly more complex, Martha's family seems very dysfunctional with several illegitimate children.
UPDATE: After looking back at my records I have corrected some information above - in particular the marriage is not later in the year he was born but later in the year of the census.