how to access drupal site using domain containing host ip address as prefix
It sounds like your site's settings might be in a multisite folder like /sites/dev.example.com/. When you aren't visiting via the hostname it will fall back to the settings in /sites/default/—check that those values are correct.