0

I've got a bunch of domains on a shared ip address (through bluehost, not sure if that matters). Visiting any domain works fine, but visiting the ip address just triggers a 404 error. After doing some digging, I found this super user answer. What I've found out so far is that when multiple domains are on a single address, the server figures out what domain to serve up based on a host header. Is there a way to set a default header value for my server so one domain is served up by the address unless otherwise specified by headers? (ie a request to 238.483.43.52 would return example.com instead of an apache error) Can it be done with an .htaccess file?

1 Answers1

1

With shared hosting, your IP address is not just for you - it is shared by other customers' domains.

What happens with a URL with a 'bare' IP address is controlled by the provider, and they are unlikely to direct it to the domain of one particular customer (thereby preferring them over others).

For your desired behavior, you would need a dedicated IP address.

tater
  • 375