DNS(Name servers), IP and domain.. All Showing Same Site...
-
Hello,
My site is hosted on VPS with dedicate IP.
The problem I am facing is my site is indexed and cached by domain, IP address and name server.
I am able to open all the pages via www.xyz.com and and IP 1.1.1.1 and the name sever like ns1. hosted.com
And if I USE site operator in google for 1.1.1.1 and ns1.hosted.com there are so many pages which is cache and in sites.
Is it any server issue my hosting company give me a reply as given below
"This is because that site is on the same ip as the nameserver. This is completely correct and normal. This is not an error."
Is it true ?
can you help me in this issue?
Thanks
-
Yes it is correct if its on the same ip. but you should 301 redirecet to the canonical domain.
1.1.1.1 and ns1.hosted.com should 301 redirect to www.xyz.com
What type of server are you hosted on linux or windows?
-
yes its linux.....
-
pop this in your htaccess file, obviouly change to fit your domain
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\xyz.com$
RewriteRule (.*) http://www.xyz.com/$1 [R=301,L]