It is entirely legal to check into a hotel under a different name. The hotel may need confirmation of your actual identity but they will adhere to the name that you have registered in when booking your room. Whether you book your hotel by telephone, online or in person, it is possible to remain anonymous.