How can I redirect subdomains to homepage?
If you’d like to redirect a subdomain back to the homepage (like blog.domain.com to domain.com), you’re going to have to use a third-party DNS provider like Cloudflare (free plan is enough).
Setting up subdomain redirect with CloudFlare
First setup CNAME record to point to root domain:
Your main domain and subdomain should both have CloudFlare enabled.
Then, go to Page Rules and add a new rule:
Click Save and Deploy and you’re done. Allow a few minutes for the redirect to start working.