Any random sub-domain shows homepage of main domain

781 Views Asked by At

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,

2

There are 2 best solutions below

0
On BEST ANSWER

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

1
On

I resolved this by going to my domain name provider DNS Zone > and removing the line of A record that has this character * in it.