This wasn’t a technical problem with the domain. The DNS changed because op’s registrar failed to renew the domain. The website was working intermittently because of propagation, not a server issue.
Problems like this are why registrars renew domains a month before they expire. The way to avoid these issues is to check to see if your domain renews on time. If your registrar fails to renew it, you have ample time to transfer it to another registrar.