Attach your smoke detector to a ceiling or a high area of a wall where you have easy access to it. Smoke detectors need to be tested once a month, with a battery change once a year, so it's not practical to have to move a dresser or a desk each time you need access.
Place your smoke detector on the ceiling in most cases. If the ceiling in a room is at different levels, place the smoke detector on the ceiling with the lowest height to give yourself easier access. A smoke detector has trouble recognizing smoke if it is too close to the heat from a vent or the steam from an adjoining, so always give the smoke detector at least 3 feet of space on the ceiling.
Place your smoke detector high on a wall if the ceiling is too high to get to, if the ceiling is on the other side of an unheated attic or if the ceiling has poor insulation that might lead the smoke detector to not function properly because it's too cold.
Pick a spot on the wall that is at least 3 inches below the ceiling, but no more than 12 inches below the ceiling. Make sure that the smoke detector has 3 feet of space from any possible air or steam, just like if it was on the ceiling. Choose an inside wall to be certain the temperature of the smoke detector stays regulated.