The first thing you'll want to do is make sure your dog is healthy. Even if the dog is one year old, treat it as if it were a puppy. Establish a routine where you are taken outside every couple of hours. Set up a place on the patio where she can go to the bathroom and always take her to the same spot.
Let her snoop around and get used to going to that place, even if she doesn't do anything. If your puppy goes to the bathroom inside and you see him on the spot, interrupt him if you can. Clap your hands or say their name in an excited voice to try to prevent them from ending up where they are. Lift them up and take them to their place to go to the bathroom immediately.
If they finish going to the bathroom outside, praise and reward. The best and simplest solution to the problem of your dog going to the bathroom indoors is to take it out more often. The more opportunities they have to go out, the less they will relieve themselves around the house. Allow your puppy to learn potty behavior in just one or two rooms at first.
Keep the rest of the house out of bounds. Then, once your puppy no longer has accidents in those first rooms, you can start giving him access to a few more places. A good indicator that your puppy is ready for more freedom is when he starts to tell you he wants to go out. They can bark or run to the door.
You can even teach them to ring the doorbell that hangs on the doorknob to let you know they need a bathroom break. Secondly, it would probably be a good idea to discuss coprophagy (eating poop) with your veterinarian, as that may be a symptom of underlying medical problems that may be frustrating your other efforts. I have a dog that was given to me by a friend but it wasn't broken in the house. I take him outside to do his business, but 15 minutes after entering, he pees or poops, what can I do with him to correct this problem? Puppies need to go at predictable times, such as after eating or drinking, when they wake up, and after playing or exercising.
For very young puppies or for puppies that are still relatively new to the household, plan one or two bathroom breaks at night. Some definitely learn the protocols of defecating and urinating faster than others, but associating a particular location with evacuation needs is within the capabilities of dogs (and is often important from a survival standpoint, when talking about wild canines). Puppies need to learn where not to go as much as where to go, so you should also prevent your puppy from going to the wrong place. Your potty training routine will need to reflect this knowledge, and you'll want to instill a new “two poop” or “two pee” rule before the booster takes place.
And that's no coincidence; in nature, these scents of poop and urine help keep the dog's territory marked. I don't expect puppies under four months old to be able to spend a whole night without needing a toilet break, but every puppy is unique, some puppies reach this milestone before sixteen weeks of age and others may take a little longer. For puppies who haven't completed their entire puppy shot series, it's best to avoid areas that other dogs use as a potty spot to help prevent any disease or disease transmission. I have had a younger dog who vocalized the need to go to the toilet, then I have this almost 2 year old boy who despite 4 to 5 walks a day will insist on going in and defecating in my son's room, I think the dog is simply not smart enough or is simply afraid of life.