Search code examples
.htaccessdnsplesk

Any random sub-domain shows homepage of main domain


I am on a dedicated server Ubuntu system. I have lately noticed this issue i.e:

f.domain.com, w.domain.com, anything.domain.com etc. Any random character or word i put in the sub-domain extension (*.domain.com) shows the home page of my main website: domain.com

Is there a way to redirect any sub-domain to domain.com or disable sub-domains ?

Thank you,


Solution

  • You should check your DNS zone first. Basically you shouldn't have a wildcard DNS entry in your zone.

    Being able to access aasdasdasd.domain.com means only one thing: you have wildcard DNS otherwise this random subdomain should not point to an ip address so you won't be able to access it