Rosemary grows as a small shrub, so use a 12-inch diameter pot to provide enough soil for the roots. Use pots with at least one bottom drainage hole and fill the pots with a well-drained potting soil containing peat and vermiculite. Place a drip tray under the pot if you grow the rosemary indoors, but avoid pots with permanently attached drip trays as these are difficult to empty.
Place outdoor plants in an area that receives partial shade, especially in the hot afternoon hours. While rosemary can tolerate full sunlight, the soil dries out more quickly in pots that are exposed to all-day sunlight. Set indoor pots near a brightly lit window, such as a south- or east-facing window. Rosemary tolerates low light but it grows bushier and is more productive when supplied with the maximum amount of light possible inside. Rosemary prefers warm summer weather and doesn't tolerate frost well, so bring outdoor pots indoors before the first frost in fall and set them back outside after all frost danger passes in spring.
Container-grown herbs dry out more quickly than those planted in beds because of the limited soil base. Outdoor rosemary may need daily watering depending on how quickly the soil dries. Feel the soil daily and water when it feels almost completely dry. Indoor pots require less frequent watering, usually once a week or less. Drought-tolerant rosemary tolerates dry soil better than wet soil. Never leave standing water in the tray under the pot as it can cause root rot.
Fertilize rosemary lightly with a balanced soluble fertilizer, such as 10-10-10 analysis or similar. Apply the fertilizer once monthly in spring and summer. While the plant is an evergreen, it goes through a winter rest period so doesn't require winter fertilization. Follow the directions for application on the fertilizer package, using the amount recommended for your pot size.