Don't smoke. Smokers are much more likely than nonsmokers to get ulcers. For ways to quit smoking, see the topic Quitting Smoking.
Avoid NSAIDs. Avoid taking aspirin, ibuprofen, and other nonsteroidal anti-inflammatory drugs (NSAIDs) for longer than a few days at a time. If you are taking one of these medicines daily, for example taking aspirin for heart problems, ask your doctor about taking medicine to help protect your stomach and intestines from ulcers.
Drink alcohol only in moderation. Limit alcohol to 2 drinks a day for men and 1 drink a day for women