Forum Moderators: buckworks & webwork

Message Too Old, No Replies

IP and domain mixup

         

bagatell

3:11 pm on Jan 29, 2004 (gmt 0)

10+ Year Member


Google has one of my sites indexed as 123.0.0.1/file.htm rather than www.site.com/file.htm. Does it matter and is there anything I can do to get it changed if it does?

yowza

7:36 pm on Jan 29, 2004 (gmt 0)

10+ Year Member



I had this happen. It is horrible. Change it as soon as possible or they will index your whole site under your IP address. You don't want this.

You have to do a redirect in you .htaccess file.

Here is the code I used to redirect.

Redirect 301 12.12.123.456/ [widgets.com...]

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.widgets\.com
RewriteRule ^(.*)$ [widgets.com...] [R=permanent,L]

Obviously you have to put your info in place of the ip address and domain name.

It took them about one month to finally make the change. In the meantime they will probably remove all of your pages from the index.

Good luck.

bagatell

9:38 am on Jan 30, 2004 (gmt 0)

10+ Year Member



This domain is on a virtual host i.e. other domains share the same IP. Will this code affect the other domains?

yowza

7:10 pm on Jan 30, 2004 (gmt 0)

10+ Year Member



If it will affect other domain names, I don't think that your host will allow you to have access to the .htaccess file to ensure that nobody messes up any other site.

I'm far from an expert in this area. I was here asking the same questions about 2 months ago when I had the same problem.

I would ask the host about it. Alternatively, you could post this question in the Apache forum at [webmasterworld.com...]

They should be able to answer your question there.