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?

7

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;
}
  • 2
    Alternatively you could choose a creative redirect... ;-) – R.. Oct 6 '15 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... – R.. Oct 6 '15 at 4:59
  • 1
    Search engines should ignore the certificate warning and accept whatever HTTP header you throw. – Andrew Lott Oct 6 '15 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. – R.. Oct 6 '15 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. – Andrew Lott Oct 6 '15 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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