Subdomains vs Subdirectories

First, let’s define what we are talking about: “blog.domain.com” is a subdomain while “domain.com/blog” is a subdirectory or a folder within a domain.

A subdirectory is used as a folder within one domain to organize smaller pieces of content, like a category of several pages. For most people they will only ever need subdirectories.

A subdomain creates more separation than just a folder, basically creating a stand alone site that could easily be it’s own domain. However, you may want to piggyback on the main domain name. For example, google.com is the main site. Gmail actually lives at mail.google.com. Google Maps lives at maps.google.com, and Google Documents at docs.google.com. These are each stand alone sites and could be their own domains but they make more sense under the google umbrella.

On my own domain, I setup several subdomains to handle different aspects of my business. One contains all the temporary websites while I build them, including several installatons of wordpress and a few standard html sites that I use to test things on. This allows me to work on projects without making the under construction site visble on the client’s domain. Another subdomain was specifically setup to handle my project management. I use a system called ProjectPier, an open source project management app that allows me to share and store files, messages and task lists with an entire team and with the client. Each one of these subdomains is basically a site in and of itself. I want to keep everything within those subdomains separate from my main site.

So there are some different reasons at the hosing/server level for keeping your site organized. But as far as the url, it doesn’t make too much difference to me whether something like a blog lives at blog.domain.com or domain.com/blog.

How do subdomains effect SEO?

According to this article, subdomains used to help with SEO because there was a chance domain.com AND blog.domain.com would show up in results while there was (and is) a limit on two pages per domain in a search engine results page (SERP). You might see two pages from one site rank really high for books, but amazon is not going to take up the whole front page. However, setting up subdomains apparently used to trick the search into thinking it was looking at a new site so technically several subdomains could all end up on the front page, which would look really good. Of course, google is all about trying to provide relevant results, so a page of subdomains should no longer happen. For example if you are a national construction company that wants to get listed for each city, you might setup subdomains like losangeles.mycompany.com and boston.mycompany.com, then just copy your site over and over, swapping out the keywords and every mention of the city to match the the site. The problem is that there is no real interesting or different content on all these sites and in fact it is very obviousy duplicate content so the SEO effect is actually negative. Or you might try cellphones.myphonestore.com, mobilephones.myphonestore.com, and on and on hoping that all of these ‘sites’ might rank high, but the best result anywhere within “myphonestore.com” is all that would show up.

One strategy that could make sense would be to create a subdomain for a section of your business or site that could really be a standalone site. If you are a department store, you may have “mystore.com” and use “electronics.mystore.com” to create a site with great SEO specific to electronics, since the searches will see it essentially a stand alone site about electronics. Then use “food.mystore.com” to target searches specific to food. If you had those things combined (along with ten others – shoes, jewelry, etc. ) the content is not as specific and may be confusing as to what the site is about. Meanwhile, they all still help pump up the image of the main domain “mysite.com”. You have created several specific relevant sites all benefitting from the main brand of “mystore.com”.

Which one should I use?

For most situations and for the average website, the easiest solution is a new subdirectory. If you are setting up a new blog, you can create a folder called “blog” install wordpress and you have your blog at “mydomain.com/blog”. There is no reason to use a whole subdomain for that. I like the simple idea that if you could almost justify starting an entirely new (but related) site, then use a subdomain. If you are simply adding a new category of pages with similar content, then just use a subdirectory. Save the subdomain for something that is big enough and clearly separate enough that it needs to be its own site.

What is your experience with subdomains?

If anyone has a set-up using subdomains, why did you go that route? Do you see any benefit or negative effects of setting it up that way?

Hi,
I am redoing my site and adding a standalone store, does it make more sense to set up a seperate store site for SEO or a subdomain. I am targeting different keywords for both sites. Both solid wordpress sites.

Hi Tavya,
First of all… I would ask Google what Google thinks of any of this. I am by no means a spokesperson for what would work/not work for them. But overall, I get a bad feeling about anyone asking about crazy domain redirects like this. It tends to mean you are either overthinking the SEO thing or doing something spammy. Unless you purchased domain names that have some existing page rank built up, redirecting (the right way – with a 301 redirect) eventually means the site being redirected will no longer mean much. So if it didn’t mean much in the first place, what did you really gain?

For #1: “redirecting” could mean a lot of things. If you are using some trick to do it, like a javascript redirect, then that would be bad. If it is a 301 redirect then it is good.
For #2: Similar answer. 301 redirects are the way to go. You can certainly redirect to a page instead of the main site. It just depends on your goals – getting people to that specific page or to the main site.

Beyond that, the specifics of what you are trying to accomplish would be too complex to get into without knowing all the details.

Hi Marty
My client is part of a large organtisation and their content is lost on the main corporate site – it is buried deep and usability is not good as is difficult to find.
I have been advising they should set up a new sub domain as this would help them group their content together and get more exposure with their clients and the search engines (there are no issues with duplicate content).
They are now talking about a completely new domain instead. My concern from an SEO perspective is related to domain ageing – the SEs like older well established domains – and their corporate domain has been around eons. Am I right is saying a sub domain is the better approach as it will help the SEs understand that it is part of the main domain family and not treat it with any ageing penalty? Or will the sub domain be treated same as an entirely new domain?
Many thanks!

My thought on subdomains is usually from a usability standpoint. To me it easiest for people to remember ‘mysite.com/blog’… then ‘blog.mysite.com’. It it kind of losing people once you do ‘mysite.com’ and then ‘mynewsite.com’.

As far as SEO, you can always (and should) do a 301 redirect anyway, so that hopefully none of that built up search engine power is lost. In the case this is done right, it should matter where you go. This is why people buy old domains and redirect them to new things.

Search engines do see each subdomain (even www.) as a separate site and that is why it is recommended to choose either ‘http://www.mysite.com’ or ‘http://mysite.com’ as your preference and direct traffic with a 301 redirect to the correct one. Otherwise you are splitting your incoming links between the people who chose to link to www or non-www.

Subdomains, while attached to the main domain, are also separate and at that point I honestly don’t know what is better. It would be specific to the content and a lot of things.

Using new domains can be a good thing for SEO. Linking between them (as long as it is not spammy) is good. Ideally you would set them up on different IP addresses and that would be even better. Links between sites on the same IP address are a little too obvious.

Again, though, the 301 redirect is key. As long as you do that correctly, all links and page rank should follow though. That is if the site is staying the same. Changes in content, design, even doing something that in the long-term might be a better thing for your site, could cause a short-term drop simply because whatever you were ranking for changed.

Any of these situations could be better than a large site with hidden content that is hard to navigate.

There’s an existing line of business that serves cities across the US. I’ll use carpet cleaning as an example. I have been asked to create either a sub domain, sub folders, or separate web pages for each city in the US that would use the carpet cleaning service. Currently competitors are doing the same and have a static html page for every city (30,000+ pages on their site). Customers normally search for city, state and “carpet cleaning” so having a page appear in search rankings that is localized to that city gains a lot of business.

Setting up subdomains for every city would be 30000 sub domains but it is much cleaner since the webserver can serve up dyanmic content based on subdomain instead of cluttering up the webserver with sub folders or lots of pages.

My concern is whether search engines would see this as duplicate content. The content is small and the only duplication is the carpet cleaning terms and description but the localized content for the city is much greater such that zip codes, cities, and local businesses are listed that are provided the service.

I question if google would see this as duplicate content or not. If they saw 30,000+ subdomains, it would certainly lift an eyebrow but seems ligitamate that a service is advertised in a search engine for all the cities it services. I wonder if anyone has taken this approach to create 30,000+ subdomains and whether there would be any performance issues created that were unexpected. Being banned from search engines totally defeats the purpose.

From the sounds of it, this is the epitome of the duplicate content idea. You basically said it yourself – the only reason for the duplicate pages is to rank in different cities and the content is essentially the same. Or is it a different list of companies on each page? That might be different if it is essentially a directory?

Assuming for a second this is duplicate content and a somewhat spammy idea… I have seen plenty of sites that get away with this, at least for a while. But I would assume that they are often short-lived. I know some of the companies that practice this type of thing jump around from domain to domain so if one gets in trouble they are ready to get the next one going and they don’t care. So if you are setting up fake domains like 123plumbing.com and a-plus-los-angeles-plumbers.com then who cares if you get banned, you can make another. Just plan for it. This won’t be a site to last for years.

But if this your branded domain, like myname.com then you want to hold on to that and I would not do anything like what you are describing.

Please don’t get me wrong. I am not advocating this idea, nor saying it is illegal or even a bad business idea. I compare this idea or any spam idea to buying bulk email lists and sending junk email, sending traditional junk mail, or hiring a telemarketing firm to harass people at home by the thousands. It might be worth the money in the end, it might drive business, especially for a bulk driven business that operates across the country.

But it is not legit (to me) and I won’t do sites like that. I personally consider it spam, regardless of whether it is legal, allowed, looked down upon, or whatever.

If I had someone who wanted to get found for locations across the country I would recommend setting Local Business Google listings and Yahoo listings for those locations. Create Yelp listings. And get customers to review you there. More work. Maybe. But if you are getting booted from search listings and redoing this all the time, that’s a lot of work too.

Let’s say your company’s hosting only provides for java or .NET and did not support PHP. However, you wanted a WordPress Blog at your domain name. A change to the cname record could point the subdomain blog.company.com to a separate server with PHP.

That would be a great way to add a WordPress blog to a site using a host that isn’t currently WordPress compatible.

Not sure what your SEO concerns are though. Are you worried about the php / .net or using the subdomain when normally you could have used a subdirectory?

I don’t know that either would influence it all that much. For the most part as long as you have great content and have it on a domain you own (whether it is blog.domain.com or domain.com/blog) and not using a blog.wordpress.com or blog.blogspot.com address you should be set.

Hi! One of my client have installed a blog in subdomain but after 2 years, he decided to move it in a subdirectory. We have a pretty nice PR and traffic as well. Would moving from a subdomain wordpress installation to a subdirectory affect our precious SEO efforts? I know that there will be since we will change URL but then I don’t know how big the impact would be. Can you tell? Thanks!

Don’t make that switch unless you know how to set-up the 301 redirects.

While it would seem to be not a big deal since it is on the same domain, you might as well be deleting your whole site.

Any links to your site will be looking for ‘blog.domain.com/page-title’ but that no longer exists. The same pages might be at ‘domain.com/blog/page-title’ but how would they know? It could be at ‘some-random-new-domain.com’ or it could be gone completely.

The search engines might eventually crawl your site again and find everything, but it would be like creating a new site. Meanwhile, all those links that gave you such great PR are pointing to other URLs – your old site.

As long as you use 301 redirects, the links will all carry over and the search engines will follow as well, removing you old URLS and replacing them with the new ones and, in theory at least, you won’t lose anything.

If you don’t set that up, you risk not only losing all that PR but losing points for a lot of 404 errors for broken links. You will also need to make sure you redirect any RSS feeds you might have had at the subdomain so you don’t lose any subscribers.

I have a client who is having me set up 100′s of subdirectories under his top domain and each of these 100 subdirs are just a copy of the same site over and over again. I told him this was not a good thing. Am I wrong or am I right? The only thing he changes is he adds the subdir url to the meta description and title.
I’d appreciate your input on this! I’ve searched everywhere and can’t find any info concerning this method of SEO.
Thanks!

Just googled this subject for a friend that wanted separate landing pages for specific keywords, this perhaps seems like another option, perhaps a better option and would negate having to buy additional domain names. Good post.

A subdomain is basically just another site…if you are creating new content and not trying to work the system then it can work for you. Google knows when someone is trying to game their bots…they are pretty smart that way. Having your blog as a subdirectory is what I have seen most and looks like what you are suggesting here as well. There is a third way of pulling this off…using a .net for the blog and keeping it separate from your .com. This way if you move either you don’t have to worry about the other and you can establish it as an authority separately to link back to your .com.

Algorithms are always changing so it is good to continually be looking at this and how it is affecting search. As we move forward, search is becoming increasingly important!

The team at google and the algorithm they use is smarter than we are, it is not completely known, and as you pointed out, always changing to keep up with the changes of the web. So I always try to point out that any system that thinks it is fooling or getting around the search engines is not going to work and will probably get you in trouble.

I actually prefer to have “mydomain/blog” rather than a subdomain. I view a blog slightly differently than some though. To me a blog is just another part of my site. I like to build entire sites (including this one) in wordpress with the blog page just being another page in that site.

The .net thing is a possibility but I would suggest not using that for a few reasons… 1) A completely separate domain needs separate hosting (or an addon account within one hosting account, which can start to make things messy with a bunch of folders.)
2) It adds another domain registration to pay for and to keep track of.
3) If I go to mydomain.net, I would probably assume that they only have that one site and I would not go look at the .com but if they had blog.mydomain.com I would know it is an offshoot of another domain and check it out.

The ease of moving one without the other is interesting though. Blogs are all pretty easy to import/export between each other or to different domains. But do you have a specific idea of when that might be needed?

I just set up a sub-domain this weekend to add pet photography on to my dog daycare business. I chose the sub-domain because there was so much information, the photography aspect basically required a website all its own and it seemed easiest to just create a new subdomain rather than a completely different domain.

I think that was a great choice and a great example of how to use a subdomain correctly. This way both businesses can be separate but still attached and feed off of each other. Even the curiosity factor makes me go to the main domain sometimes. So if I see your http://photography.paws-on-the-run.ca/ then I will probably take a look at http://paws-on-the-run.ca/ but if you started some unrelated domain I might never know your other site existed.

Hi Marty
I am going to create websites http://www.country.com for all cities so i am confuse how to create them………..
should i use subdomains or sub directories and i also want city wise domain names like http://www.london.com which is useful for london users to remember..

As I mentioned in the article, I would use subdomains for anything that could stand alone as a site itself. If it is just a page (or even up to several pages) worth of content, use a subdirectory.

Subdomains are viewed as different sites. Which can be good because you might target that city more. But it would not really build up the power of the main site unless you do a good job of linking back to it and linking amongst the different sites.

Think of them as standalone sites. The benefit is that I can see country.com in the name so I might be drawn to that and it helps brand that name because I will see london.country.com, newyork.country.com, etc the consistent brand becomes country.com

Beyond that, it really depends on the content you are offering on each. Without knowing and analyzing that, I wouldn’t want to suggest one of these options over the other for anyone.