Forum Moderators: Robert Charlton & goodroi
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!
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]
Options +FollowSymLinks
RewriteEngine on
#
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
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
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.