I agree that a vet check up is in order.
Assuming there is no medical issue, I would go back to basics. Take him outside regularly (first thing after waking up, after playing, 20-30 min after eating, and regular intervals throughout the day). Take him to the exact same spot in the yard and if he does his business, use a cue word/phrase (I say "do business," others say "potty," it can be whatever you want but be consistent) and REWARD. Lots and lots of praise and a couple treats. Make sure you are quick with the praise and treats because you want him to connect the reward with the behavior (doing business outside). Otherwise you will not be reinforcing anything. DO NOT rush him inside immediately after going. Let him hang out for a while, run, play, then go inside.
Inside, you must supervise. He cannot be trusted to wander through the house alone and go into other rooms. Keep him in the same room as you. If he starts to go, pick him up and take him outside to his spot. Reward for finishing the job outside.
You need to be vigilant and diligent. Aim for no accidents inside. None! Accidents = practicing wrong behavior which eventually leads to developing a bad habit. This will require that you go outside much more frequently, probably more times than he really needs to go. Might be inconvenient, but housebreaking is hard work!
While you are away at work or wherever, you may need to crate him for the time being. But you or someone else needs to take him outside frequently (every 3 hours or so). Do business first, get the reward, then play and stretch the legs, have a drink, then back to the crate. You are using the crate to teach him that he CAN hold his business until he is outside and to prevent accidents. The longer you go accident-free, the better the chance that he will stop going in the house.