Web site responds to lixxx.members.com address

Hi,

I have my own domain name, say example.com

My linode responds to example.com address, but it also responds to my liXXX.members.linode.com name. How to restrict my linode to respond to example.com only?

9 Replies

@dmitry_orlov:

Hi,

I have my own domain name, say example.com

My linode responds to example.com address, but it also responds to my liXXX.members.linode.com name. How to restrict my linode to respond to example.com only?

Using that DNS name or your IP will by default go to the first virtual host that apache finds. So, put in a "default" virtual host that goes nowhere before your virtual host for your domain.

@glg:

@dmitry_orlov:

Hi,

I have my own domain name, say example.com

My linode responds to example.com address, but it also responds to my liXXX.members.linode.com name. How to restrict my linode to respond to example.com only?

Using that DNS name or your IP will by default go to the first virtual host that apache finds. So, put in a "default" virtual host that goes nowhere before your virtual host for your domain.

I have a default apache web site in /etc/apache2/sites-enabled

Does it mean that I should remove everything under section?

 <virtualhost *:80=""># noop</virtualhost> 

Thanks again!

You should have a file called 000-default in /etc/apache2/sites-enabled/ apache loads virtual host files in name order so 000 comes first, the contents can be whatever you like but I suggest something like

 <virtualhost *:80="">RewriteEngine On
RewriteRule ^(.*)$ http://www.yourdomain.com/ [R=301,L]</virtualhost> 

That will redirect all requests to www.yourdomain.com

@obs:

You should have a file called 000-default in /etc/apache2/sites-enabled/ apache loads virtual host files in name order so 000 comes first, the contents can be whatever you like but I suggest something like

 <virtualhost *:80="">RewriteEngine On
RewriteRule ^(.*)$ http://www.yourdomain.com/ [R=301,L]</virtualhost> 

That will redirect all requests to www.yourdomain.com

Thanks!

Concerning this I think I found a little easteregg. :D

My Linode responds with

> (¬_¬)

even though Cherokee is not configured to respond to that.

All neighbours of mine respond with their website or do not respond.

Or is this possibly a cherokee easteregg? :?

How can I change this so it does not redirect, but rather gives like a 404, if you go to the members.linode url?

I want to keep my apache default as is, for other purposes.

hmm.. this brings up a valid point, any way we can make it show;

# noop

So that way guessing my linode id won't show that I even own a website?

Cause when I type in my linode address, it goes to my default website… !

The members.linode.com hostname doesn't contain any more information than can be obtained from knowing your IP address. Trying to hide it is completely pointless.

Sure, it shows that it's a Linode IP, but so does a simple whois.

I heard some web crawlers give you negative points if same website is available from more than one domainname. No idea if that's true, nor if it's a good idea… but if you really want to not have the main site on the address, your best bet would be

# if you don't have this line in the main config file, uncomment:
# NameVirtualHost *:80

 <virtualhost *:80=""># no ServerName, the catch-all "default" that grabs liXX-XXX, http://your.ip.addr.here/, and such
# uncomment one of
# Redirect / http://realsitename.com/
# or
# DocumentRoot /path/to/blank/page/or/something</virtualhost> 

 <virtualhost *:80="">ServerName realsitename.com
Redirect / http://www.realsitename.com/</virtualhost> 

 <virtualhost *:80="">ServerName www.realsitename.com
DocumentRoot /path/to/site</virtualhost> 

 <virtualhost *:80="">ServerName www.othersiteIhostifany.com
DocumentRoot /path/to/othersite</virtualhost> 

 <virtualhost *:80="">ServerName othersiteIhostifany.com
Redirect / http://www.othersiteIhostifany.com/</virtualhost> 
# so on

Of course, if you prefer, make the www. version redirect to the no-www instead.

PS. Sorry for the edit, I'm sleepy and made a mistake. ;)

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