Linode Forum
https://forum.linode.com/

Server IP resolving to the wrong site
https://forum.linode.com/viewtopic.php?f=19&t=8275
Page 1 of 1

Author:  shodan_uk [ Fri Jan 06, 2012 3:12 pm ]
Post subject:  Server IP resolving to the wrong site

Hi all,

I'm hosting several sites on my Linode with a fairly standard vhost based Apache set up.

Unfortunately, the IP address of the server is resolving to one of the sites and this has been picked up and indexed by Google.

Now when the client searchs for their site by keyword, it comes up listed as the IP address.

The IP is "178.79.137.105" and if you search for "aspire fitness gym essex", you'll see it. The full URL is also indexed: http://www.aspirefitnessgym.co.uk.

I've set up a reverse DNS entry via the control panel, which I hoped would resolve the IP to another URL: www.centralmediauk.com but that doesn't seem to be working.

Any ideas?

Cheers,
Terry

Author:  obs [ Fri Jan 06, 2012 3:19 pm ]
Post subject: 

The first virtual host is used for any host that doesn't match one of the other virtual hosts.

If you have your virtual hosts in separate files set your centralmediauk.com file to be the first lexicographically i.e. start it with a 00 if they're all in the same file just put that host at the top of the file.

Then restart apache.

Author:  hybinet [ Fri Jan 06, 2012 6:08 pm ]
Post subject: 

After you add a virtual host to handle the raw IP as @obs said, consider setting up a 301 redirect to the website that was indexed by Google. (You can do this in the virtual host config, or just add an .htaccess file.) After a while, Google will pick up the 301 and start indexing the proper domain. This way, your search rating won't be negatively affected while the transition is taking place, and anyone who may have bookmarked the IP address will also be able to go to your real site.

Author:  shodan_uk [ Fri Jan 06, 2012 7:36 pm ]
Post subject: 

Thanks for the advice guys, renaming the vhost has worked.

The correct aspire site has already been indexed by Google and has only been up for a couple of weeks so hopefully the 301 won't be necessary.

Cheers,
Terry

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/