Forum Moderators: Robert Charlton & goodroi
[edited by: brotherhood_of_LAN at 12:48 am (utc) on Dec 23, 2014]
[edit reason] fixed link [/edit]
Normally I wouldn't care too much, but Google is actually indexing some of these gibberish subdomains which can result in bad stuff since they might consider it duplicate content.
I don't understand. What physical content is it finding at ekcjklrjg.example.com?
Oh, whoops, you mean you're not actually using any subdomains? Then all you need is the domain-name-canonicalization redirect given above. Don't worry about "mail" or "pop" or similar. Unless your site has a very weird configuration, those wouldn't be used by http requests. But if you're really not using any subdomains, there's not much point to keeping the wild cards enabled.
Note 2: Yes, I'm aware the SEO community often talks about there being a duplicate content penalty, but there's really no such thing. It simply looks that way sometimes because Google picks a different URL with duplicate content to display in the results than we think it should.
I've read a lot of articles that suggest that the above isn't quite true...ofc because search engine algorithms are a bit of a black, I haven't seen anyone 'prove' that duplicate content issues directly cause SERP penalties, but people do seem to be concerned about it...
Deleting the wildcard CNAME record will solve your problem with weird domain names in Google, but that record isn't there without reason. One possible reason as already mentioned is the existence of subdomains used for mail (smtp.example.com, pop3.example.com, imap.example.com) or nameservers (ns1.example.com, ns2.example.com).
[edited by: TheMadScientist at 10:36 am (utc) on Dec 23, 2014]
would the 'solution' I asked about in my OP (just deleting the wildcard CNAME record) do the trick? Or is that something I should avoid, and instead address using MadScientist's code?
It has just this instant occurred to me that Google could easily do wild-card-subdomain requests in exactly the same way they check for Soft 404s. Don't know if this is something they actually do.
The one oddity that I still don't quite understand is why Google would index any of these gibberish subdomains at all!?
The one oddity that I still don't quite understand is why Google would index any of these gibberish subdomains at all!? I was under the impression that they'll only index something their crawlers find backlinks to (or perhaps that gets submitted via their URL submission engine.)