NSW Health is urging anyone who visited the Sydney CBD and Leichhardt in the past few days to be aware of the symptoms of measles after an infected tourist visited the areas.

The young adult international traveller is believed to have caught the infection in their home country and first developed symptoms in Melbourne on July 15.

It is important to be vaccinated against measles, not only to protect oneself but to protect others through "herd immunity", NSW Health says.

The person then travelled to Sydney and visited tourist hot spots before being diagnosed with measles and put into isolation.