Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

IP indexed instead of Domain Name

And how do I fix this?

         

webdude

1:21 pm on Jul 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I made a mistake on a new site I developed. While it was in the testing phase, I had the link to the home page in the footer pointed to an IP rather then the domain name. The site has been live for about 3 weeks now.

When searching for the company name, the IP address is the one that is popping up #1 and #2 and the domain name is popping up #5 and #6. Page ranke shows the IP as 2 and the domain name as grey. The IP is cached in G and the domain name is not.

Is there a way to fix this problem? I fear dupe content and perused the forum and found some horror stories regarding this but no clear-cut answers as to how to fix it. I host my own DNS servers and have complete control over my IP block and domain names.

Can you use the URL removal tool to remove just IP address pages without removing the domain name pages?

Thanks for any input!

webdude

7:55 pm on Jul 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have done a 301 for the IP and am hoping this will help. Has any one ever used the removal tool for IP addresses... will this work?

tedster

8:12 pm on Jul 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



301 for URLs that use the IP address is all you should need. I'd be wary using of a url removal request, not knowing exactly how the google back end works.

webdude

8:20 pm on Jul 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah, that's what I was thinking too. Guess I'll just wait it out... stupid mistake on my part.

I also did 301s for each individual page. I am hoping that will kickstart the process.

123.123.123.123/thispage.html
123.123.123.123/thatpage.html
123.123.123.123/otherpage.html

SEOold

8:24 pm on Jul 10, 2007 (gmt 0)

10+ Year Member



That should do the trick.

g1smd

11:15 pm on Jul 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There is no need to do this with one line per page, when you can use Mod_Rewrite to redirect for any URL on the site in just 2 lines of code.

jdMorgan

11:36 pm on Jul 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> I also did 301s for each individual page.

Yes, there is no need for that, and since more redirects are more error-prone, I'd advise against it. Besides, if the domain-wide redirect is correct, then the page-specific ones will never be applied.

On Apache, all you should need, assuming that "www.example.com" is your preferred canonical domain is either:


Options +FollowSymLinks
RewriteEngine on
#
RewriteCond %{HTTP_HOST} ^[0-9]+(\.[0-9]+){3} [OR]
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

-or-

Options +FollowSymLinks
RewriteEngine on
#
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

in your top-level .htaccess file.

The first will redirect any requests using the IP address or the non-canonical hostname, while the second example will redirect requests for any non-blank non-canonical hostname. Note that the Options line may be required, may not be required but allowed, or may be not required and not allowed. Or, if it is required but not allowed, then you can't use mod_rewrite on your server. The only way to find out which of these applies to your server is to test with and without that line.

Jim

Vimes

5:04 am on Jul 11, 2007 (gmt 0)

10+ Year Member



We block access by ip and only allow access by domain name.

as the sites young you'll not lose much and save all the possible issues of redirect problems.

Vimes.

webdude

11:46 am on Jul 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks all,

This is on a w2k server running IIS5.

And I might beg to differ, if I may. All the pages were indexed with the IP. If I left a basic 301 in place, all the redirects default to the home page.

We are talking just 20 pages of content right now. I tested each redirect for errors and have them all working correctly.

tedster

5:26 pm on Jul 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Even on IIS, you don't need to 301 all requests to the home page. In the "Redirect to" box of Internet Services Manager, enter http://www.example.com$S$Q - the "S" preserves the remainder of the URL - the filepath following the domain -- and the "Q" preserves any query string from the original request. Make sure the "Permanent Redirect" box is checked, and you're good to go.

webdude

6:42 pm on Jul 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks you very much, tedster! That's something I'll use in the future, for sure...