2

I am experiencing the issue explained at https://stackoverflow.com/questions/53065450/subdomains-that-dont-exist-are-indexed-by-google-zombie-subdomain-removal-via. Notice how the the search engine Google returns a result linking to my site (see the image below):

enter image description here

I never configured ww.w as a subdomain in my Apache configuration. I have no idea where Google took that from. I did configure https://www.jaimemontoya.com to simply redirect to https://jaimemontoya.com, which means simply removing the www. I did that by creating a CNAME Record to specify that www.jaimemontoya.com is an alias of jaimemontoya.com. But I never configured anything for ww.w as a CNAME Records, nor in the Apache configurations. I wonder where Google took that configuration from.

What I understand from https://stackoverflow.com/questions/53065450/subdomains-that-dont-exist-are-indexed-by-google-zombie-subdomain-removal-via, in the answer by @MrWhite, was that the solution is: "Remove the wildcard subdomain and it will resolve your issue." How are wildcard subdomains removed? Is that done from the Apache configuration, or by creating DNS Records maybe for * to apply to all subdomains? I am guessing I might need to write something in a <VirtualHost *:443> block in the Apache configuration, to remove wildcards for subdomains. Thank you.

UPDATE 1: I am running the website on a DigitalOcean Virtual Private Server. This is not a shared hosting service and I have created the Apache configurations myself from scratch. So I am not using any of the pre-built standard configurations that shared hosting services typically provide.

UPDATE 2: Find updates to this question at https://stackoverflow.com/questions/77558953/how-to-remove-the-wildcard-subdomain-on-apache-to-prevent-google-from-indexing-s.

2 Answers 2

1

Wildcard subdomains are specified in DNS. To remove the wildcard subdomain you need to remove the * record from your DNS records.

You could also configure Apache to respond with 404 errors for unrecognized host names. To do this, create two VirtualHost directives. Whichever one comes first is the default one that is used for unknown host names. Virtualhost config: routing and wildcard usage has example configuration for this.

10
  • I have an A Record with a *, as seen in this image: i.stack.imgur.com/vEk6d.png. I guess I need to remove that and then configure Apache Virtual Hosts for each of the subdomains that are being problematic by Google indexing them (w, ww.w, etc.) I do not need subdomains and I would like to have https://w.example.com/post-entry/ redirecting to https://example.com/post-entry/, and https://ww.w.example.com/post-entry/ redirecting to https://example.com/post-entry/. I have no idea where Google found those subdomains w and ww.w that I never configured on Apache. Nov 28, 2023 at 13:47
  • 1
    Once you remove the *, those problematic subdomains will no longer resolve, so putting specific config in Apache for them would be pointless. Nov 28, 2023 at 13:58
  • I tried what you said and you are right. The only problem is that Google already indexed ww.w.jaimemontoya.com/blog/2023/10/17/23/21 and when people click on it, the site no longer resolves, which means losing that traffic. The ideal case scenario would be for that visit to be redirected to jaimemontoya.com/blog/2023/10/17/23/21. But in that case I guess I need to create an Apache Virtual Host for ww.w, or maybe a ServerAlias so that the ww.w is removed, similar to how when people visit www.example.com/my-page/ they are redirected to example.com/my-page/. Nov 28, 2023 at 14:04
  • If I remove the * A Record, this is what my domain registrar tool does: i.stack.imgur.com/VDkqA.png. Nov 28, 2023 at 14:11
  • 1
    Must be some sort of domain parking service. I've never seen a registrar try to put in a wildcard like that for it. :( Nov 28, 2023 at 16:26
0

Problem fixed. I had for example these problematic instances:

enter image description here

enter image description here

Now when clicking those links, the result is this:

Result for the first link in the SERPS:

enter image description here

Result for the blog:

enter image description here

The root cause of the problem was that Turbify, my previous domain name registrar, was forcing the existance of the * A Record, and if deleted, it would create a * CNAME Record. It was impossible with Turbify to remove the * Record in the form of either CNAME or A Record. I explained my step-by-step solution at https://jaimemontoya.com/blog/2023/11/29/02/48/.

Your Answer

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

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