Sunscreen may prevent tanning to some degree. Dermatologists recommend wearing sunscreen every single day — and for good reason. Wearing a chemical- or physical-based sunscreen may help prevent the sun’s rays from causing photoaging and skin cancer.

It may still be possible to get a slight tan, even if you do wear sunscreen. However, no amount of deliberate tanning is considered safe.

Sunscreen works in two different ways. Popular chemical-based sunscreens work by absorbing ultraviolet (UV) rays and altering them before they have a chance to cause any damage. Examples of chemical-based sunscreens include oxybenzone and octisalate.

Physical-based versions, on the other hand, reflect and scatter UV rays away from your skin. Zinc and titanium oxides are two examples of blocking agents used in physical sunscreen. These ingredients were recently designated as GRASE, or generally recognized as safe and effective, by the FDA.

Perhaps more important than choosing between chemical and physical sunscreens is looking for one that is broad spectrum, or protects against the two damaging types of UV rays. These are called ultraviolet (UVA) and ultraviolet B (UVB) rays.

You should also wear water-resistant sunscreen when doing certain activities. This helps to ensure that the product doesn’t fall off your skin and leave it exposed to UV damage.

Still, it’s important to remember that sunscreen acts as a filter. It can’t prevent your skin’s exposure to the sun 100 percent. So, you can still tan at some level.

In the short term, your skin responds to sun exposure by becoming inflamed. As a result of a sunburn, your skin adapts by tanning. The more prolonged your exposure, the more severe a burn may be. Tanned skin is also the result of melanin released in the affected area.

The negative effects may not always be seen by the naked eye. You won’t be able to see more long-term effects of UV exposure, such as cancer and photoaging. Wearing a broad-spectrum sunscreen with the right SPF can help minimize this type of damage.

In fact, according to the Skin Cancer Foundation, wearing SPF 15 sunscreen may reduce your risk of melanoma skin cancers by up to 50 percent, as well as non-melanomas by 40 percent.

A broad-spectrum sunscreen means the product protects against both UVA and UVB rays. UVB rays consist of shorter wavelengths that can cause burns, wrinkles, and age spots. UVA rays are longer and can lead to burns and skin cancers.

Wearing sunscreen not only protects against direct UV exposure incurred during outdoor activities, but it also protect your skin from day-to-day exposure. This includes driving, walking to your place of work or a class, and taking your kids to the park.

Left unprotected, even seemingly small amounts of sun exposure can add up over time. At minimum, you should wear a sunscreen-containing moisturizer on your face, neck, and chest every single day.

Each sunscreen contains an SPF, or sun protection factor. The ideal SPF in a sunscreen depends on your exposure level to the sun. Everyday sunscreens may contain a lower SPF, but direct exposure to the sun requires a higher SPF.

It’s first important to understand what SPF numbers mean. They refer to the time it would take for your skin to burn without wearing sunscreen, rather than offering a specific level of protection.

So, for example, an SPF of 30 means your skin could take 30 times longer to burn than it would if it were left unprotected. This is only true though if you apply it correctly in the right amount.

An SPF also means that a certain percentage of skin-aging UVB rays are still allowed to penetrate the skin.

According to the Skin Cancer Foundation, 3 percent of UVB rays can enter your skin with SPF 30, and 2 percent with SPF 50. This is also how you can still get tan while wearing sunscreen.

The American Academy of Dermatology recommends using a sunscreen that is at least SPF 30 or higher every day.

If you’re going to be in direct sunlight for extended periods of time, such as when swimming or playing sports, you may want to use a higher SPF, such as SPF 50 or SPF 100, and reapply it frequently.

There are some cases where a higher SPF may be needed, though, such as if you have a history of skin cancer, albinism, or immune disorders that make you burn easily.

You can also talk to your dermatologist about the exact SPF you should be using. They may even recommend adjusting SPF for certain times of the year, as well as your location. Higher altitudes can put you at a greater risk of UV exposure, as can locations closer to the equator.

It’s important to see your dermatologist every year for a skin check. You may need to see them more often if you have a recent history of skin cancer or have frequently tanned in the past.

See your dermatologist right away if you have an unusual skin lesion. Any moles or bumps that show signs of growth, changes in color, bleeding, or itching may warrant a biopsy. The sooner a dermatologist detects skin cancer, the better the treatment outcome.

Melanoma is the deadliest type of skin cancer. Tanning — with or without sunscreen — can increase your risk. Early detection may decrease the risk of death.

Wearing sunscreen can prevent some of the skin inflammation that leads to tanning, but this shouldn’t be your main concern when it comes to UV rays.

Wearing it every day is essential to help protect your skin against burns, aging, and cancer. Be sure to reapply every 2 hours, as well as after sweating and swimming.

You can also take other preventive measures, including the use of protective clothing, hats, and sunglasses. Avoiding peak sunlight hours between 10 a.m. and 4 p.m. may also help minimize exposure.

Tanning beds are not safe alternatives to sunbathing and should be avoided.