Migraine affects up to 25% of women of reproductive age. In the majority of these women, migraine improves progressively during pregnancy, but symptoms generally recur shortly after delivery. As suboptimally treated migraine in pregnancy could have negative consequences for both mother and fetus, the primary aim of clinicians should be to provide optimal treatment according to stage of pregnancy, while minimising possible risks related to drug therapy. Nonpharmacological approaches are always first-line treatment, and should also be used to complement any required drug treatment. Paracetamol is the preferred drug for acute treatment throughout pregnancy. If paracetamol is not sufficiently effective, sporadic use of sumatriptan can be considered. NSAIDs such as ibuprofen can also be used under certain circumstances, though their intake in the first and third trimesters is associated with specific risks and contraindications. Preventive treatment should only be considered in the most severe cases. In women contemplating pregnancy, counselling is essential to promote a safe and healthy pregnancy and postpartum period for the mother and child, and should involve a dialogue addressing maternal concerns and expectations about drug treatment. This Review summarizes current evidence of the safety of the most common antimigraine medications during pregnancy and breastfeeding, and provides treatment recommendations for use in clinical practice.