Walking is a great low-impact exercise for weight loss and overall health, but if you’re dealing with knee pain (or have in the past), a few extra precautions may be needed. Whether you want to prevent injuries or just learn how to deal with stiffness and aches so you can exercise more frequently, these seven tips can help you keep up your walking routine:

KNOW WHEN TO REPLACE YOUR SHOES

Shoes designed for walking require the right amount of flexibility and cushion to allow for proper form, while easing the impact forces on your knee joint. Choosing the right shoe can also make a big difference in your comfort, which is why it’s important to replace them roughly every 400 miles. Keep in mind, this number can depend on a number of factors including your weight, daily mileage and whether you currently rotate your shoes. If you’re not counting miles, plan to buy a new pair every 4–6 months if you walk daily. This ensures the midsole isn’t too broken down to provide proper cushioning for your knees and ankles.

OPT FOR SOFTER TERRAIN

Sidewalks and pavement are probably the most available and convenient surfaces when walking around your neighborhood, but they are not ideal for your knees. Whenever you can, opt for dirt paths and grass instead. Walking in a local park, along the border of a golf course at night and on hiking trails are excellent options to save your knees from the less forgiving asphalt and concrete. Moreover, if you currently have knee pain, avoiding hills and stairs can also be helpful, as they tend to put more stress on the patella tendon and the knee in general.

WORK ON YOUR FORM

An efficient stride allows you to use more muscle groups and places less stress on the tendons surrounding the knee like the iliotibial band and patella tendon that are susceptible to overuse injuries. This includes using the right foot strike, maintaining good posture and using your arms to generate power. Here’s a basic guide you can use to begin practicing good walking form.

AVOID SITTING FOR EXTENDED PERIODS OF TIME

Getting up and walking frequently is important to counteract the negative effects of sitting and also keep your joints from getting stiff. If you’re already getting more than 7,000 steps per day, getting up to stretch or perform light exercises like shallow squats can help keep the fluid around your knee moving and reduce inflammation from prolonged bouts of sitting.

FOCUS ON STRENGTH TRAINING

If your quadriceps are weak, it can cause your knee to deviate toward the midline or rotate externally during your stride and eventually lead to pain or injury. To ensure your knee stays in line with the hip and foot upon impact, you may need to adopt a strength-training routine that focuses on building quadriceps strength sufficient enough to prevent fatigue during long workouts. Try performing a couple bodyweight exercises like wall sits, lunges and squats a couple times a week.

MAINTAIN A HEALTHY WEIGHT

The more you weigh, the more stress is placed on your knees during exercise. Over long distances, even 10 extra pounds can make a big difference. If you’re using walking as a way to lose weight but still haven’t reached your goal weight, consider making changes to your diet and adding more strength training to your routine to shed more weight. Doing so helps take your performance to the next level, improves your endurance and helps you stay injury-free.

HAVE A RECOVERY ROUTINE

Recovering properly between workouts is important to allow your muscles and tendons to build strength and adapt. Eating foods that provide you with enough nutrients to help your body recover properly is key. Try these recipes for quick, healthy options. You’ll also want to foam roll, stretch, hydrate and get plenty of sleep.