Google SERP shows URL from my domain but with other domain names

November 21, 2019 161 views
Apache

Hello all,

I have setup Apache web server and hosted a few sites, some HTTPS and some HTTP.

Let’s say, I have the following domains and pages
https://aaa.com/pagea1
https://aaa.com/pagea2
https://aaa.com/pagea3

https://bbb.com/pageb1
https://bbb.com/pageb2
https://bbb.com/pageb3

http://ccc.com/pagec1
http://ccc.com/pagec2
http://ccc.com/pagec3

http://ddd.com/pagedd1
http://ddd.com/page2
http://ddd.com/paged3

when I searched Google for a unique keyword on that can only be found on aaa.com, I got the results for https://aaa.com BUT also results as under

https://ccc.com/pagea1
https://ddd.com/pagea3

I am stumped why Google would find and index pages from other domains.

Any ideas?

3 Answers

Hello, @ShilpaWalia

Can you confirm that these unique keywords are not present and were not present at any time on:

https://ccc.com/pagea1
https://ddd.com/pagea3

Keep in mind that you can also request Google to re-index your site/pages.

  1. Login to - Google Search Console
  2. Add a site and verify it with the available methods.
  3. After verification from the console, click on URL Inspection.
  4. In the Search bar on top, enter your website URL or custom URLs for inspection and enter.
  5. After Inspection, it’ll show an option to Request Indexing
  6. Click on it and GoogleBot will add your website in a Queue for crawling.

If these pages are not present on ccc.com and ddd.com this should fix this for you.

Hope this helps.

Regards,
Alex

Hello @alexdo

The keywords are unique to aaa.com. I will request Google to re-index the pages but what I dont understand is what did it happen in the first place.

One more thing I noticed is that if I visit a non HTTPS site using HTTPS, the domain name remains the same but the content is from AAA.com, since that is the first domain in the list of virtual host

  • Yes, this is a normal behavior and it can be really confusing. It happens because the loaded page does not have SSL and virtual host for port 443 and the Apache will load the first site that has a virtual host for port 443. This can be easily solved by installing a Let’s Encrypt SSL or installing self-signed certificate as well.

    Hope this helps.
    Regards,
    Alex

    • Thanks Alex,

      Adding certificates for all websites isnt an option due to hosting package limitation, I might do it sometime in the future.

      Here’s what I did for now, let me know if this is valid solution:

      I created a dummy site 000-default-ssl.conf
      and in the root folder of this site, I added the following php script in index.php

      header("HTTP/1.1 301 Moved Permanently");
      header("Location: http://".$_SERVER['SERVER_NAME']."/");
      

      Any site that isnt HTTPS enabled, will reach the default HTTPS site and will be redirected to the HTTP version of the respective site.

Hello, @ShilpaWalia

This sounds like a good solution if you’re not able to install SSL for each site. Thanks for sharing this with the community!

Regards,
Alex

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!