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
-
Hosting Sites under same IP / subdomain usage?
Hello everyone! The company I am working for is working on selling websites templates to clients in the near future. In terms of SEO purposes, would it be detrimental for our clients if we hosted all of these sites under the same server/IP? Also, in the past we've sold sites under a domain we own, adding them on as a subdomain. For example, we would own yourflowers.com, and if Mark's Flowers wanted a site, we would give him: marksflowers.yourflowers.com These sites are going to be the same niche as we are industry specific (example would be, we sell website templates specifically designed for flower shops around the United States). I want the best possible SEO experience for our clients and I believe using subdomains and hosting under the same server IP can be detrimental, but I wanted to see what the Moz community thinks of this. Any feedback is appreciated! Thanks
Technical SEO | | KathleenDC0 -
To Subdomain or Not Subdomain?
I have a client that has a construction company that services a regional area. They now developed a PRODUCT that they want to promote that would have a national reach. We are redesigning the site, with new branding and all. How do I treat the website URL structure? Is the product it's own domain because of the target market? Or should I make a subdomain because we want to tie the companies together in some fashion. Every article I read confuses me more on how to handle this. Thoughts?
Technical SEO | | cschwartzel0 -
No index on subdomains
Hi, We have a subdomain that is appearing in the search results - I want to hide this as it looks really bad. If I were to add the no index tag to the sub domain would URL would this affect the whole domain or just that sub domain? The main domain is vitally important - it is just that sub domain I need to hide. Many thanks
Technical SEO | | Creditsafe0 -
Changing a blog url from subdomain to subfolder
I am abou to change my company blog from a subdomain (blog.mydomain.com) to a subfolder (mydomain.com/blog), from suggestions from this awesome community! Not only that though, because the current blog is on another server than the main site I have to move my blog between servers as well. This will be a big hassle for me, and means a big risk for errors as I don't have a clue what I am doing on the development part. Hint: I'm no developer. My blog is fairly new, having posted 18 blog posts so far. There is no major linking to or from the blog as it has been basically no activity on the blog. It has been fairly good optimized for SEO, with custom plugin settings for Wordpress SEO plugin and similar. Also followed advice from Rand regarding wordpress SEO. So I guess my question is: Would it be a big loss for me to just start over with a new blog on the subfolder domain? And move content over from the old blog manually (and then deleting the old one). Or would It be plain stupid taking that route? Thankfull for all help I can get!
Technical SEO | | danielpett0 -
No crawl code for pages of helpful links vs. no follow code on each link?
Our college website has many "owners" who want pages of "helpful links" resulting in a large number of outbound links. If we add code to the pages to prevent them from being crawled, will that be just as effective as making every individual link no follow?
Technical SEO | | LAJN0 -
E-commerce solution and subdomain issues
Hello All,
Technical SEO | | CherieP
In light of Wil Reynold's closing keynote at Portland's Searchfest, I thought I might try posting here to get some advice. We run a family business on the side and we're looking at starting to use volusion.com for our e-commerce solution. The catch is we currently have a wordpress site summitmining.com running on thesis with great SEO. Ranking #1 & #2 for our highest trafficked terms. Ideally, I'd like Summitmining.com to direct to the Volusion store and then summitmining.com/blog to go to our wordpress installation BUT since the volusion site will be hosted with the company and they will not host our wordpress installation we'd have to use a subdomain instead of a subdirectory which I understand will be bad for SEO. Does anyone have any recommendation on how to set this up without totally screwing up our ranking OR any recommendations of an easy to use shopping cart (I've worked on a magento site before and it's too complex for us) that wouldn't require a separate or subdomain? Thank you so much!
-Cherie Prochaska
503-816-3557
cherie@c-squaredassociates.com
@cherieprochaska0 -
Moving subdomain ? How to ?
Hi all. I've purchased a domain name two years ago with the idea to offer wide range of services. I've also created a sub-domain providing specific service for highly competitive keyword. Sadly plans went wrong and I didn't use the root domain name at all, just the sub-domain providing that service. There aren't much links to that sub-domain, but all are quality links, until recently I've managed to keep positions between 5 and 7 without any effort, but yesterday I saw that it's dropped to 9. The question is, before I start to build links and write articles to get back up my domain, is it worth to move that sub-domain to my original root domain. As I said, there aren't much links to that sub-domain, it only has pagerank1, also for the last year the original root domain was redirected (301) to the sub-domain to not loose traffic and I'm scared if I reverse this procedure and redirect my sub-domain to the root domain that Google will get confused. It's a tricky question I know 🙂
Technical SEO | | VasilTasev0 -
Subdomain to Subcategory migration for an active news website blog
A very active news website has a very active blog as a sub-domain. For all good SEO reasons, they want to transfer the blog from a subdomain to a subcategory. Now, the issue is this blog is very active, updated daily and lots of people comment on it. So how should the website go about making this change while causing minimal seo loss and ensuring that the commenting process remains active and on going. A detailed answer would be much appreciated! Thanks! I cam accross this blog post that guides on how to change a subcategory to a subdomain: http://devilsworkshop.org/moving-a-wordpress-blog-from-a-subdirectory-to-subdomain-preserving-permalinks/. Any words on this would also be appreciated!
Technical SEO | | RishadShaikh590