Allergies are tricky. Sometimes they are against a food ingredient, sometimes they are against something in the environment. If you are lucky enough to know exactly what the allergy trigger is, you can try to avoid it. In the case of food, finding a food without a problem ingredient (usually a protein) is a good start -- but sometimes dogs are so sensitive to an ingredient that you need a prescription allergy diet from your vet (these diets are prepared in a very specific way to avoid any possible traces of allergy triggers).
If you don't yet know what exactly your dog is allergic to, we encourage you to work with your vet to treat any existing flare-ups (this is a separate treatment from just cutting out the allergy trigger) and to work through the best way to manage your dog's allergies. It may be appropriate for you to try different foods with different protein sources.