Plant rosemary in a sunny garden bed that gets six or more hours of sun per day. Drainage is critical for rosemary. Avoid areas where water stands after a rain or at any time during the year. This Mediterranean native will rot in cold, wet soil.
For gardens with clay soil or poorly drained areas, grow rosemary in a 12-inch-tall or taller raised bed to help with drainage around the roots.