Website accessible via IP adress

Hi,

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

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.

@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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct