Having cancer in the family can increase your chances of developing not only the same cancer but other types too, research suggests.
A study of 23,000 people in Italy and Switzerland found that for each of 13 cancers, close relatives had an increased risk of the same disease.
But there was also evidence that a family history of one cancer could significantly raise the risk of others.
Cancer charities say risk depends on genes, lifestyle and environment.
The research, published in the journal Annals of Oncology, followed 12,000 patients with cancer at different sites in the body.
They were compared with 11,000 people without cancer.
The researchers collected information on family history of cancer, particularly in a first-degree relative (those who share about 50% of their genes - namely a parent, sibling or child).
They found people with a first-degree relative with cancer of the larynx had triple the normal risk of developing oral and pharyngeal cancer.
Those closely related to someone with oral and pharyngeal cancer had a fourfold increased risk of oesophageal cancer, while breast cancer doubled the risk of ovarian cancer for female family members.
Men had a 3.4-fold increased risk of prostate cancer if a first-degree relative had bladder cancer.
The research also confirmed some known cancer risks. They include a raised risk of women developing breast cancer if they have a family history of bowel cancer.
Study leader Dr Eva Negri, of the Mario Negri Institute for Pharmacological Research in Milan, Italy, told BBC News: "If you have a relative with one type of cancer your risk of the same type of cancer is increased.
"What this study has highlighted is that sometimes if you have a relative with one cancer your risk of another cancer can be increased.
"The relative risk of a different cancer generally tends to be lower than for the same cancer."
In some cases, the links between different cancers may be due to shared environmental factors, such as family smoking and drinking habits, she said.
But there was also evidence of genetic factors affecting multiple cancer sites in the body.
Jessica Harris, Cancer Research UK's senior health information manager, said cancer risk is determined by a combination of genes we inherit from our parents, our lifestyles, and our environment.
"Whether or not someone in your family has had cancer, living a healthy life can really help to stack the odds in our favour, and reduce the risk of cancer," she said.
"The main things you can do are to be a non-smoker, cut down on alcohol, and stay in shape by being active and eating a balanced diet."
Eluned Hughes, from the charity Breakthrough Breast Cancer, said some breast cancers do run in the family, however it was vital that women remembered most cases were not hereditary.
"In order to fully understand the causes of breast cancer, we need to study more women over a longer period of time," she said.