We are having a random issue, our site will revert back to the IP for the hostname.
To fix it I have to save something (like template or product) and it fixes it, but it will always revert back.
Example, clicking any link when it's broken will result in 1.1.1.1/blah/blah.php or w/e instead of domain.com/blah/blah.php