If your dog is a new member in the family, it is completely normal to pee or poop at home. This is due to several factors, how:
Change of environment
Change of schedules in the walks
Stress / nervousness
Lack of Adaptation
If we need to teach our dog to relieve itself in a specific place in the house, we must put into practice two techniques simultaneously, the relation of smell and positive reinforcement.
We must always put in the same place, a site that is available to the dog at all times, a newspaper or a soaker, something that has a characteristic smell for the dog.
When the dog pee outside that place we will ignore it, but when he does it there we will reward him and we will give him lots of pampering. It is the way to let the dog know that he did it well.
With a little patience and perseverance, we will get our dog to always pee in the same place.