Discourse site loads via IP but via domain only header

You should start over from scratch and rebuild. Something is deeply wrong with your configuration.