Earlier studies on breastfeeding and atopy in infants have yielded contradictory results. We examined the relationship between exclusive breastfeeding and atopic dermatitis (AD) in a cohort of infants born between 1 October 1997 and 1 October 1999 in south-east Sweden. We evaluated the risk of AD ‘at least once’ or ‘at least three times’ during the first year of life in relation to duration of exclusive breastfeeding: <4 months (short exclusive breastfeeding; SEBF) vs. ≥4 months. All data were obtained through questionnaires. Of 8346 infants with breastfeeding data, 1943 (23.3%) had suffered from AD during the first year of life. Duration of exclusive breastfeeding was not associated with lower risk of AD (p = 0.868). SEBF did not influence the risk of any AD (OR = 1.03; 95% CI OR = 0.91–1.17; p = 0.614) or AD at least three times (OR = 0.97; 95% CI OR = 0.81–1.16; p = 0.755) during the first year of life. Adjustment for confounders did not change these point estimates. Neither was there any link between SEBF and risk of AD among infants with a family history of atopy [adjusted odds ratio (AOR) = 1.16; 95% CI AOR = 0.90–1.48; p = 0.254]. Furred pets at home were linked to a lower risk of AD both among infants with a family history of atopy (AOR = 0.76; 95% CI AOR = 0.60–0.96; p = 0.021) and among infants with no such history (AOR = 0.79; 95% CI AOR = 0.69–0.90; p < 0.001). Infants with no family history of atopy were less prone to develop AD if parents smoked (AOR = 0.76; 95% CI AOR = 0.61–0.95; p = 0.016). This study indicates that exclusive breastfeeding does not influence the risk of AD during the first year of life, while presence of furred pets at home seems to be negatively associated with AD.