When you walk down the street, does your dog zig and zag, in every direction--on the sidewalk, onto the street, onto your neighbor's lawn? The problem is that your neighbor may not appreciate your dog on their lawn, especially if that is where your dog chooses to relieve himself, and the street can be dangerous if a car is coming down the road. Teaching your dog to walk next to you and stay on the sidewalk can be difficult, as there are so many great things your dog wants to smell and investigate on either side of the sidewalk, but teaching him to stay on the sidewalk makes walking with your dog much more pleasant, safe, and popular with your neighbors.
You may not require your dog to heel, but getting your dog to walk on a loose leash and stay on the sidewalk, without veering off onto lawns or the street, can be taught to keep your dog safe and your walks more pleasant. A dog that constantly walks onto private property may be unpopular in your neighborhood, and there are hazards present on other people's property. If your neighbor treated their lawn with chemicals, your dog could pick this up on his paws. Also, other organic hazards such as garbage and other animal waste can be present in people's yards which could make your dog sick. On the other side of the sidewalk, cars and traffic present a hazard if your dog wanders onto the street.
Keeping your dog on the sidewalk is an important behavior to keep your dog safe and training your dog to stay on the sidewalk can be started when your dog is just a puppy. You will also want to teach your dog to stop at the curb when you need to cross a street, so that he knows that stepping off the sidewalk is something he does only when asked to.
You will need lots of treats to reinforce good sidewalk walking behavior. You can also use a clicker if your dog is used to being reinforced with a clicker. While walking your dog on the sidewalk, make sure you have a good leash and collar or harness that fits well. Using a long lead to practice having your dog walk with you may be useful for some methods. Make sure you have time to work with your dog on walks, do not be in a rush or lose patience with your dog and create a negative association with walking, which should be a fun time for you and your dog.