Subdirectories vs subdomains
-
Hi SEO gurus
Anyone has input on what's better?
blog.domain.com vs domain.com/blog
store.domain.com vs domain.com/store
etc
I think the subdir (/xyz) will concentrate authority on the same subdomain so should be better? However sometimes it is tidier on the server to maintain online stores or blogs in a separate strucutre so subdomains work better in that sense. I just want to make sure that doesn't affect SEO?
Cheers!
-
Thanks for the responses Yumi, @oznappies & Aaron
-
Sub directories/folders used to be the definite way to go for the most SEO value however things have evened out for the most part. I think sub directories are more user friendly... we are used to the slash... extra periods can get tricky.
-
I've asked this one on here before and have some test sites trialling both ways and the sub-directory gains rank much faster from the root than the sub-domain.
-
in my opinion? definitely subdirectory. and in fact it will still be tidier on the server maintainability ..
For example please consider the following setup
you have your MYDOMAIN.com located at /var/www/html-mydomain
and by using a SUBDOMAIN.MYDOMAIN.COM, you will generally have them at /var/www/html-subdomain-mydomain
it looks tidier as you said it BUT you can achieve exactly the same thing using MOD_REWRITE
so perhaps right now your MYDOMAIN.com/SUB is located at /var/www/html-mydomain/SUB right? you can actually write a .htaccess that whenever user is going to MYDOMAIN.com/SUB it actually load the page under /var/www/html-subdomain-mydomain instead ! (so the server maintainability between using the subdirectory and subdomain will be exactly the same)
a much more technical example , put this inside your .htaccess of your root domain home directory
RewriteCond %{HTTP_HOST} ^[www\.]*sub-domain-name.domain-name.com [NC] RewriteCond %{REQUEST_URI} !^/sub-domain-directory/.* RewriteRule ^(.*) /sub-domain-directory/$1 [L]
This will cause the following situation
when people go to http://sub-domain-name.domain-name.com/a.html AND http://domain-name.com/sub-domain-directory/a.html
both of them will open your /sub-domain-directory/a.html instead
hope this help
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
What to do about this subdomain for SEO?
This is a bit of an unusual structure and I'm having difficulty explaining the question so pardon my being a 'noob', haha. The website I'm working on has some content under Forums that is hosted on another domain. The main website is https://yournorthside.org.au/ and if you select under the main Nav > Forums > Lived Experience it will take you to https://yournorthside.saneforums.org/t5/Lived-Experience-Forum/ct-p/lived-experience-forum. So it's as if it's a subdomain. (notice even the appearance of the main menu changes, weird) Apparently, saneforums.org has a requirement for that content to be on that subdomain. So therefore it's not part of my sitemap and now crawled or indexed. My question is is this structure okay? What are the implications for SEO? Should I be looking to implement some type of no follow link or something? Or is it actually beneficial in terms of all their content gives us 'link juice'? Can you link me to any resources / articles that give further insight?
Technical SEO | | kelseyc0 -
Hyphens and underscores vs hyphens and double hyphens
Hello. I am thinking of changing the hyphens to underscores. The problem is that i have a magento extension for improved navigation and if you choose to use hyphens for special characters it will not let you choose this also for separating attributes. It will allow you only bouble hyphen. So when i go to sub-category https://www.shoponline.gr/peripoihsh/somatos/kremes-somatos/ and filter two brands (victoria's secret and frais monde) it returns the url https://www.ishoponline.gr/peripoihsh/somatos/kremes-somatos/victoria-s-secret--frais-monde instead of the iniital url with undescore which was https://www.ishoponline.gr/peripoihsh/somatos/kremes-somatos/victoria_s_secret-frais_monde. So it is "victoria-s-secret--frais-monde" vs "victoria_s_secret-frais_monde". Any suggestions? Thank you in advance.
Technical SEO | | iShopOnline0 -
Unknown Subdomains Ranking
In spot checking some pages that I recently launched, I found subdomains ranking in place of the domain. The strange thing is, we never set up these sub-domains and they don't exist on our server. The pages, though they're indexed with the proper title and meta-description, time out when clicked. We're operating on Drupal 7, pages launched at the beginning of the month. The other pages within the series of content are ranking properly. Any thoughts or tips to resolve this?
Technical SEO | | JordanNCU1 -
Anything new if determining how many of a sites pages are in Google's supplemental index vs the main index?
Since site:mysite.com *** -sljktf stopped working to find pages in the supplemental index several years ago has anyone found another way to identify content that has been regulated to the supplemental index?
Technical SEO | | SEMPassion0 -
Subdomains
Hello Seo Experts, Can any one help me with this issue... I do have issues with my subdomains, My site name is http://www.bharatdesi.com, should I have subdomain http://www.bharatdesi.com/hyderabad this way or hyderabad.bharatdesi.com. Please any can answer my question, which way I have to organize my subdomains... and also give me some examples.. Thank you.
Technical SEO | | Vinss0 -
UK and US subdomain. Can both rank for some keyword terms?
One of my clients has one root domain http://www.website.com and there are two versions, the US and the UK. So there are two subdomains uk.website.com and us.website.com. Both subdomains contain similar content/landing pages and are going after the same keywords. One site is supposedly crawled by UK crawlers but still shows up in US-based SERPS. Will Google take into account that both subdomains are going for the same keyword terms and only rank one of them? How is this kind of thing handled?
Technical SEO | | C-Style0 -
Why do I get duplicate pages, website referencing the capital version of the url vs the lowercase www.agi-automation.com/Pneumatic-grippers.htm
Can I the rel=canonical tag this? http://www.agi-automation.com/Pneumatic-grippers.htm****http://www.agi-automation.com/pneumatic-grippers.htm
Technical SEO | | AGIAutomation0 -
Sub pages Vs subdomain Pagerank flow.
I Have Question about Pagerank flow:
Technical SEO | | tommytai
If ihave a site :domain.com and i have 2 solutions like:
Solution #1: Quote: | domain.com/blog and domain.com/video if i try to do :
Root domain only link to
domain.com/video and
domain.com/blog | Solution #2: Quote: | Root domain only link to
video.domain.com and
blog.domain.com | So <acronym title="Google PageRank">Pr</acronym> domain.com/blog = <acronym title="Google PageRank">Pr</acronym> blog.domain.com ?
and <acronym title="Google PageRank">PR</acronym> domain.com/video = <acronym title="Google PageRank">Pr</acronym> video.domain.com ? And don't know why a subdomain of blogspot or Wordpress ranking easier than a new domain like:keyword.wordpress.com and keyword.com So What Wordpress pass to keyword.wordpress.com ?0