I want to install my new site content on a subdomain like subdir.mydomainsite.com
instead of the root domain.
This is a new domain and not previous content to redirect. The root URL will be empty and inaccessible to anyone trying to browse the root site mydomainsite.com
and will be redirected to subdir.mydomainsite.com
automatically.
What's the best way to do this? I thought about a simple index.php
with an 301 redirect from root to subdomain, but not I'm not sure if there's a better SEO way to do it. Will Google find this redirection weird and penalize the site in some way?