If the root domain works but a subdomain doesn't, first check whether the subdomain has the correct DNS record pointing to the intended server. Then verify that the subdomain is added and configured properly in your hosting panel, including its document root or deployment settings. Also check SSL certificate coverage and whether the server is configured to handle requests for that hostname. You can use dig subdomain.example.com to inspect DNS resolution. If the DNS record is correct, check the hosting configuration and server logs to narrow down the issue.