Let's say we have a domain for example
www.example.com
And we have some subdomains for different countries
au.example.com
us.example.com
uk.example.com
eu.example.com
What are the disadvantages to this. I'm speaking from an SEO Google perspective and anything else you may think of?
The problem We have a client side JS redirect that redirect users based on their country code. This is unavoidable currently as we have no control over our backend.
If we use our root domain for the sole purpose of redirecting (via HTACCESS for example) to subdomains (I'd host this elsewhere and change the A records to reflect that), what could be the drawback to the SEO etc.
Some web hosts allow you to host multiple domains and subdomains on the same web account, with those domains redirected to a subdirectory of your main domain. For example, if the files for your domain (say) eg-domain.com can also be accessed as example.com/eg-domain/ , this paragraph probably applies to you.
Using a subdomain on your website makes your URL structure look bigger. Subdomains are not regarded as 'proper websites in the eyes of Google users. You will be responsible for more hosting fees as subdomains require separate hosting accounts. A subdomain may not yield your geolocation signal for search engines.
Redirect root domain to a subdomain If you have already added that subdomain at your host, create a corresponding DNS A or CNAME record for that subdomain. Create a proxied DNS A record for your root domain. This record can point to any IP address since all traffic will be redirected prior to reaching the address.
With a subdomain, the posts are featured on a separate website, so the content won't contribute as a major ranking factor for your main site.
So there's a few tradeoffs to using subdomains over subdirectories in regards to where to redirect.
First off, Google's official documentation claims that it treats subdomains and subfolders identically after a few days (it takes a few days for it to learn how to crawl your subdomains). However, it likely will take a little bit more setup to setup subdomains rather than subfolders. Ultimately, the biggest winner will be whichever is easiest for you to maintain and update as that will allow you to optimize SEO in other ways.
The other consideration between subdomains and subfolders is security. Browsers treat subdomains as separate origins, meaning that the same origin policy will give us some added security benefits. Specifically, this means that content on one origin cannot read content on another origin by default, it must be explicitly granted that approval. So, if you're hosting multiple services across different origins and one of them has a web vulnerability in it, it will be significantly harder for an attacker to jump from that domain to another. Consequently, you can prioritize security efforts for the domains that contain the most sensitive data.
With subfolders, if one page has a web vulnerability, the attacker can easily pivot to attack other pages as well. In this model, the security of your site is as good as your weakest page, rather than each page (subdomain) having its own separate security model.
Based on your example, it looks like these websites may have similar content but be localized a bit differently. If that's the case, and your sites are simple (serving static content or not having any particularly sensitive components) I'd recommend subfolders as it's likely easier to setup.
If you have complex components (or you might in the future) or each site is fairly different I'd recommend subdomains for the security gain. If you're unsure if you're going to have complex/sensitive components in the future I'd also recommend subdomains as it errs on the side of caution.
The redirect in general should have no impact on SEO as Search Engines can use it to index your subdomains. I would however, include a link on the page which does the redirect, just to make it more explicit to Search Engines where the redirect is going to and to help them index.
There's an article Neil Patel wrote on this subject that I read a few months ago. It is my understanding that subdirectories are better for SEO than subdomains in most cases. If that's a viable option, I would recommend it.
However Neil's article goes over SEO optomization techniques to use. Overall it shouldn't affect SEO much especially if subdirectories are an option.
Search Engine Results Favor Subdirectories over Subdomains
Neil Patel Article: https://neilpatel.com/blog/international-seo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With