help redirecting IP address

Posted by Alice on Pro Webmasters See other posts from Pro Webmasters or by Alice
Published on 2012-07-01T19:42:25Z Indexed on 2012/07/01 21:25 UTC
Read the original article Hit count: 265

Google has indexed the IP address of my site rather than the domain, so now I'm trying to set up a 301 redirect that will redirect the IP address and all subsequent pages to the domain.

I currently have something like this in my .htaccess file (however don't think it's working correctly?):

RewriteCond %{HTTP_HOST} ^12.34.567.890 RewriteRule (.*) (domain address)/$1 [R=301,L]

I've used various redirect checker tools and keep getting the message: "... not redirecting to any URL or the redirect is NOT SEARCH ENGINE FRIENDLY"

Am I doing something wrong or is there something else I should be trying?

Thanks! Alice

© Pro Webmasters or respective owner

Related posts about apache

Related posts about htaccess