views:

21

answers:

1

I've got a duplicate content issue where there's two instances of my site indexed in google:

the first is the actual domain: http://domain.com

the seconds is my WHM/CPanel preview of the account: http://123.456.78.9/~/domain

Is there any way to redirect the IP version to the real domain?

+1  A: 

Try this

RewriteEngine on  
RewriteBase /
RewriteCond %{HTTP_HOST} ^123.456.78.9$ [NC] 
RewriteRule (.*) http://domain.com/$1 [R=301,L] 
antyrat