Areas of Placement
Because smoke rises, you should place alarms on the ceiling. If you cannot do this, place them high up on a wall according to manufacturer's instructions. Most importantly, read the installation instructions that come with the alarm.
Smoke alarms should be mounted on the ceiling at least 4 inches from a wall or on a wall with the top of the alarm not less than 4 inches, or more than 12 inches, below the ceiling.
Areas to Avoid
There are certain locations to avoid such as near bathrooms, heating appliances, windows, or close to ceiling fans.
Don't place smoke detectors/alarms in kitchens, bathrooms, furnace rooms, workshops, garages, or in other spaces where temperatures can fall below 32°F, or exceed 100°F. These areas are subject to fumes, steam, dust and smoke, which can generate false alarms and contaminate the alarm.
Don't install alarms where air movement can delay the alarm. This means they should be away from windows and at least 3 feet from warm or cold air ducts or return ducts. Also, don't install them between an air return and a bedroom door. Smoke alarms should not be located within 3 feet of doors to a kitchen or bathroom with tub or shower.
Don't place alarms where it is inconvenient or unsafe to test them, like in tall foyers or high over a stairway.
If smoke alarms are placed in a room with sloped ceilings, the alarm should be located on the high side of the ceiling.
A smoke alarm installed in a stairwell must be located in such a way that smoke rising in the stairwell cannot be prevented from reaching the alarm by an intervening door or obstruction.
A smoke alarm installed to detect a fire in the basement must be located close to the stairway leading to the floor above.