I have many sites set up, each with a dedicated ip. However the sites are all accessible by their ip address E.g http://188.8.131.52 displays the same as accessing it via /http://www.whatever.com
Is there any way I can either make the ip redirect to the domain associated with it, or load the default "apache is working" page?
I am aware I can set up an htaccess or edit the vhost config file to do this. But I want this to be the default behavior on the server, and not have to do it for 100+ sites, or each time I create a new account.
As a side note, I think this is happening because I am using godaddy dns for these sites rather than setting up nameservers in cpanel. E.g, when creating an account I select "Use name servers set at registrar" and then point the godaddy @ record to the ip address on the server)