The official website for The Settlers of Catan

Question about Base Game Seven and Robber - Do I have to place the robber on a different hex after a “7” was rolled, or may I briefly remove him from the hex he was occupying and then return him to the same hex?

Answer

You must place the robber on a different hex.