9

I found out that someone who used to have my current IP address, still has an old A record and google is using that for returning search results. As a result, when someone searches the name of my website in google, it shows their url and my sites metadata and name. And when anyone clicks on the link it goes to our website but uses their domain name. (Displays invalid security certificate though)

I have already done a whois lookup and made an attempt to connect the owner of the registered domain name.

If i never hear back, what can I do to fix google search results?

2 Answers 2

8

The simplest solution is to just return a 403 or 410 response for any traffic on the unwanted domain.

In .htaccess on Apache you could do something like:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteRule ^ - [L,R=410]

In Nginx you could do something like:

server {
  listen       80;
  server_name  domain.com www.domain.com;
  return       410;
}
server {
  listen       443;
  server_name  domain.com www.domain.com;
  return       410;
}
6
  • 2
    Alternatively you could choose a creative redirect... ;-) Oct 6, 2015 at 4:56
  • 1
    Also, if the site is https, redirects/errors will happen after the certificate error, which may be undesirable. It's probably possible to configure something at the TLS layer to react to their domain name appearing in the SNI, but I'm not sure what the best approach would be to get search engines to drop them from the results. Ideally a search engine should be rejecting responses with invalid certificates as if they were MITM attacks against the crawler... Oct 6, 2015 at 4:59
  • 1
    Search engines should ignore the certificate warning and accept whatever HTTP header you throw. Oct 6, 2015 at 8:21
  • 1
    Why? That undermines the whole integrity purpose of https; an attacker in a position to MITM can feed malicious results to the search engine to harm SEO or otherwise harm the site's reputation. Oct 6, 2015 at 14:39
  • It's generally up to users to check certificate chains, which they generally delegate to their browsers. Search engines traditionally haven't been part of that process. But that's another conversation entirely, so unrelated to the original question. Oct 6, 2015 at 14:54
2

Thanks everyone. What fixed it was the previous owner of the IP responded. He was really nice considering he had no idea who I was, but he fixed it by removing the old A-Record.

But if he never got back to me, what Andrew Lott said would be the next course of action.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.