There are at least 2 modules to switch the site under maintenance
You can also use /studio/settings/security and mark the site locked and define the pages that should stay visible for unauthenticated users. In that case, only members can log in and see content. To avoid the login for members too, disable login....
The more convenient way - in my point of view - is one of the modules I mentioned above.