Whitehead, aged 31, had been searching for a new club since ending a four-year spell with the Potters at the end of last season.
He said: "As for Robert, I spoke with him recently and he really enjoyed his time here and spoke very highly of the club.
"I'm old and wise enough to know what Middlesbrough is about. I spoke to the manager, he told me what he wants and what he thinks the club can do. You take all that on board, but ultimately it's a football decision and I think I am in the right place."