Er schloss die Tür hinter sich
I read a sentence "Er schloss die Tür hinter sich." Does "sich" mean "himself" here? I thought it would be "Er schloss die Tür hinter ihm." Is this a correct sentence? What's the difference between these two? If they are interchangeable, which one is more common?
(My German is too limited to write the question in German, but I can understand some German with the assistance of translation tools. Feel free to answer in either English or German.)