Website accessible via IP adress
i run bandaratours.com on linode 172.104.150.19.
When browsing to 172.104.150.19 you can reach the website. Even Google linked 172.104.150.19 as a search result for "bandara tours" like: Bandara Tours 172.104.150.19/
What can i do to not point the ip to the website? I googled a little bit but did not find a solution.
edit: webserver = nginx
Greetings
Tom
2 Replies
In the case with Apache, what typically happens is that once a request does not match any of the defined vhosts, it is routed to the default vhost, which is the first vhost apache loads. Hence, you would define another vhost, with special ServerName default, ordered so that it is first in the sequence, and have it serve the content you would want. Usually that'd just be a redirect to your named website.
@emestee:
What would you like to happen when one opens the IP link?
In the case with Apache, what typically happens is that once a request does not match any of the defined vhosts, it is routed to the default vhost, which is the first vhost apache loads. Hence, you would define another vhost, with special ServerName default, ordered so that it is first in the sequence, and have it serve the content you would want. Usually that'd just be a redirect to your named website.
Thank you, i'll try this with nginx.
I'll make it so that the bare ip adress points to an empty html site. This is because i run multiple domains on a single linode ip and it looks like google indexes results it finds at the ip adress. i do not want this to happen.