551. Did John the Baptist recognize Jesus as the Son of God?

Yes, he recognized him immediately.

The next day John seeth Jesus coming unto him, and saith, Behold the Lamb of God, which taketh away the sin of the world.
... And I saw, and bare record that this is the Son of God. John 1:29-34

No, he still wasn't sure when he was in prison.

Now when John had heard in the prison the works of Christ, he sent two of his disciples, And said unto him, Art thou he that should come, or do we look for another? Matthew 11:2-3

John calling unto him two of his disciples sent them to Jesus, saying, Art thou he that should come? or look we for another? John 7:19