Blog

Google Treats Sub-domains Differently-Here is How

My latest findings ;)

If you are an SEO expert, perhaps you already know all these things; that is fine, there might be others who don’t. :)

The basic difference between a website that resides in the sub-folder of the main domain, and a website that resides on a sub-domain of the main domain, is that while the former is deemed to be an integral part of the main domain, the latter is taken as a completely different website, separate from the main domain. At least, that is how Google™ seems to think!

1. In Google Webmaster tools, if you expect to see the stats of all the sub-domains just by adding your main domain there, you are wrong! If you add only your main domain, Google would show you stats related to the main domain only; if you also want to see the stats of your sub-domains, you would need to add each sub-domain separately in Google webmaster tools, just the way you add a normal top-level domain.

2. I am not aware of any sitemap generator tool that automatically includes sub-domains in the sitemap file of the main domain. For example, if you want your sitemap generator tool to generate a sitemap for:

domain.com

and if you also want the links to

ss.domain.com

and

yy.domain.com

to be included in that sitemap, that ain’t gonna happen! You would need to generate separate sitemaps for each sub-domain.

And if you try to manipulate your sitemap by manually adding your sub-domains in the main domain’s sitemap file, and submit that sitemap to Google, Google would refuse to index the sub-domains and show you the following error for each sub-domain included in the sitemap file:

"URL not allowed
This url is not allowed for a Sitemap at this location."

Short and sweet, treat your sub-domain as a top-level domain: add the sub-domain separately in Google webmaster tools, verify it, generate a separate sitemap for that sub-domain and add it to Google webmaster tools. Voila! You can now watch the stats of your sub-domain just like you do with your main domain. ;)

3. When building backlinks, if you point all backlinks to your main domain only, this would only impact the rankings of your main domain, along with the subfolders under it; certainly, it would also impact the rankings of your website’s sub-domains by a margin, but it would be far from your "high" expectations. If you want your sub-domains to rank as high as your main domain (or at least, high enough to help you pay your bills ;) ), you would need to point as many backlinks to your sub-domain too. ;)

Of course, the one question you would ask me is this: "Why even bother with Google Webmaster Tools?". The answer is simple: with the advent of HTTPS search (currently available to US-based users only, but very soon would certainly spread to other countries too) as well as a helpful Firefox addon to encrypt your Google searches via SSL, probably Google Webmaster Tools is your only ray of hope as far as "search queries" (keywords used by web surfers to find your website) are concerned (I am not sure if Google Analytics records search queries made through encrypted pages; I have not even logged into my Analytics account for ages :P ).

On a different note, I am a self-confessed privacy advocate; especially online, we need to be very careful of what (sensitive) information we reveal to the "prying eyes" of "strangers". But is not an encrypted search option a bit too much, not to mention the slow loading search results pages… (any HTTPS page would load slower than a normal page, as a matter of fact)? Plus the user’s information is not totally "private" in this case; Google still has access to all the search data; only we poor webmasters don’t! :|  Of course, it is useless to rant over this, as Google will do what it likes! :)

That is it! Did you expect anything else? Sorry to disappoint you, then. ;)

However, if you know anything more (over and above what I said above), please enlighten me and other readers by posting a nice comment. Thanks :D

33 Comments

  1. Tweets that mention Google Treats Sub-domains Differently-Here is How -- Topsy.com

    […] This post was mentioned on Twitter by Renee Benzaim. Renee Benzaim said: RT @arindamc Google Treats Sub-domains Differently-Here is How http://bit.ly/a3pfUf […]

  2. Rob Barclay

    Hi that is a great post that will benefit many, additionally to add to what you have I would like to say you can create as many sitemap.xml as you require in each different domain and then create a sitemapindex.xml which will list each of the individual sitemap index’s which you then upload to google webmaster tools and google will then follow the sitemapindex.xml to each of the listed domains and read each sitemap.xml individually.

    Example of a sitemap index would be:

    http://www.example.com/sitemap1.xml.gz
    2004-10-01T18:23:17+00:00

    http://www.example.com/sitemap2.xml.gz
    2005-01-01

    More info:

    http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=71453

    1. Arindam

      @Rob

      Thanks. I would look into that option. ;)

  3. Spencer

    Nice post. I was always interested on this topic whether it is better to go with sub domains or sub folders. Most webmasters are divided on this subject. But if use it for a particular niche like weight loss, sub domains are the way to go.

  4. Scott Sheen

    In most cases I much prefer the sub-domain over sub-folders. For the very same reasons you gave. Google wiil see the sub-domain as a TLD and treat it seperatly. This means I can SEO the crap out of the sub-domain. I can hit multiple micro niches all within the same niche.

    Scott

  5. Paul

    Matt Cutts did a post on how Google was starting to look at subdomains as part of the whole site rather than as a “separate site” back in December of 2007 here:
    http://www.mattcutts.com/blog/subdomains-and-subdirectories/

    However, as some have already mentioned Google still seems to treat subdomains as separate sites in certain instances – and I’ve never been able to figure out how they make that determination.

  6. Rob Barclay

    just a note in my post the blog has stripped the html so my example is not as it should be, but if you want to know more about sitemapindex.xml the info in the link to google webmasters will show the same example i tried to post

    1. Arindam

      Thanks for the update Rob. I did read the Google article.

      EDIT: Actually my sitemap generator tool DOES generate a sitemap.xml.gz file too. Funny thing is that I never knew about its utility, but I do upload this file along with the sitemap.xml file to my web server :P

      Thanks again for your comments. :)

  7. Celie

    Hi and thanks for the info, it is easy to get confused by sub domains, addon domains, main domains, now I will just leave it as it comes. Thanks.

    1. Arindam

      @Celie

      Where is the confusion? You PAY for addon domain and main domain, whereas you can create as many subdomains you want under your main domain, for FREE! Simple? :)

  8. Rob Barclay

    There are lots of benefits to sub domains especially if you get something quite generic and short, I registered a 5 character .biz domain which then enables me to easily have: niche1.*****.biz niche2.*****.biz etc without having to spend a fortune on domains that I want to use for a specific niche. and the domain i got looks great for this type of use.

    Additionally the other benefit of sub domains is if you have a lot of http requests on your site it can be slow loading as browsers will only run 2 lots of concurrent downloads per domain, so by introducing 2 sub domains, maybe 1 for images and the other for cookie less content it will enable you to stream your content to the browser @ 6 times the speed rather than 2

    1. Arindam

      Hi Rob, you are absolutely right! The money-saving benefit about sub-domains is something I had covered in an earlier article:
      http://flexiblewriter.com/search-engine-optimization-demystified-part-1

      I did not know about the second benefit, though :)

  9. Rob Barclay

    thats a big article :) but certainly looks worth a read, have left it in another tab for later this evening :)

    1. Arindam

      @Rob,

      Big and boring ;) It is a very old article, but hopefully you would still find it useful. ;)

  10. Rob Barclay

    as you know knowledge is power! so always worth a read :)

  11. Marizka

    In the end it looks like without links a domain would achieve no success

  12. Renee Benzaim

    This is a good resource article. I’ve always confused add-on domains and sub-domains. Now I will take your article and tape it to my wall! No more confusion. . .

  13. Rob Barclay

    @ Marizka

    In the end without links the internet would achieve no success :)

  14. JohnGG

    Mmm, Ken Evoy of SBI said to use a sub-domain. I guess that is because his system doesn’t handle add on blogs very well.
    Still they enjoy 35% of their sites in the top 1% of Alexa. Maybe it counts as a tweek, rather than as an essential.

    Cheers

    JohnGG

  15. Randy Brickhouse Sr.

    I’m not at all technically savvy, however I have read a few things in the Google forum and Webmaster tools concerning sitemaps, because I have been struck by this very situation of “URL not allowed”, so now I have been looking at a big red X for my sitemap status.

    The person I had to upgrade my site did something wrong with the configration of the sitemap, so I was told, and everything that was suggested that I do has not worked. Of course I am unable to make contact with this person. I was told since it was on a WordPress site, I could fix this from the dashboard, but to no avail. Arindam, could you give a couple of recommendations?

    Thanks and God bless.

    1. Arindam

      @Randy

      I can tell you what I do. For the record I have tried a heck lot of sitemap plugins and almost all of them had one bug or other. So here is a simpler tool you can use (this works for both WordPress and non-WordPress sites):

      http://gsitecrawler.com/en/download/

      Just use the “New site wizard” to add your site, then use the “filters: to exclude any URLS you don’t want the crawler to crawl and index (it would automatically import your site’s robots.txt file, so if any URL is excluded in robots.txt then no need to exclude it again here), and you are done. The tool would generate a group of files among which you need to upload the following:

      The sitemap.xml file (For Google)
      The sitenap.xml.gz file (For Google)
      The urllist.txt file (For Yahoo)
      The urllist.txt.gz file (For Yahoo)
      And the gss.xsl file (the style sheet of the sitemap.xml file)

      I don’t even submit to Yahoo, but keep the urllist files on my server anyways; if Yahoo or others want to crawl my site and are able to locate the file… ;)

      Hope my solution helps :)

      An alternative (if you don’t want to install softwares) is http://www.xml-sitemaps.com/. It works okay but the limitation is that the free version can index only 500 pages of a site.

      One crucial thing: make sure that the URL in your sitemap is same as the one you submit in Google webmaster tools. See answer to question no.4:
      http://flexiblewriter.com/4-search-engine-optimization-questions-answered

  16. Nan

    Hi Arindam and others,

    I submitted this question on a well-known forum and think I have my answer, but would like add’l feedback.

    I currently have a site that has been active for over 10 years. I used to offer website copywriting services, but disconintued them about 3 yrs ago. I’m currently using the site to promote various IM products.

    Now I want to completely convert the site to a new theme, BUT … I also want to keep all the info that’s there now. I considered a subdomain, but others have said I’ll essentially lose any rankings I have for the existing site.

    This is the plan I’ve come up with — I will leave the pages that are there now as-is, except for the index page, which I will put in a separate subfolder. Since it’s mostly an ‘introductory’ page, a temporary ranking loss won’t matter all that much. Since the ‘location’ of the inner pages won’t change, they should keep their ranking.

    I will temporarily put a note at the top of the ‘new’ index page to let people know where they can find the ‘old’ index page.

    The reason I’m not just getting a new domain name and setting up a new site is because my current domain name is ‘perfect’ for my new theme.

    Whaddayathink? Will my plan work?

    1. Arindam

      @Nan

      Your plan might work ;)

      But an easier approach is, if you use WordPress, is to use the Redirection plugin:

      http://wordpress.org/extend/plugins/redirection/

      You simply 301 redirect all the files of your old site to those of the new site. Easy, and those who visit the old URLS would be automatically redirected to the new ones. Plus, you won’t lose your rankings either! :D

      http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93633

  17. Rob Barclay

    when you say theme do you mean niche or theme as in wordpress theme/style? i will presume you mean niche.

    My personal thoughts are that if you change the content of the home page and still link to the internal pages in the same manner that you should see no issues aprart from terms that you rank well for on the home page will be lost.

    Why not create a little expanding ajax menu that is not in your face but opens when you click on it? that way all your links to your internal pages are still on your home page and not too much in your face?

  18. Nan

    @Arindam: My site is not built on WordPress, although I do have a content-related WP blog in a subfolder.

    @Rob: You presumed correctly. I meant a new niche. The new site will be aimed at book writers and readers. No IM stuff at all so I’m not too fond of the ajax menu suggestion.

    Thanks for the feedback!

    1. Arindam

      @Nan,

      If it is not wordpress, you can 301 redirect through your hosting control panel (such as cpanel=>Redirects) or by editing your site’s .htaccess file. :)

  19. Nan

    @Arindam,

    Unless I’m missing something, I don’t think a ‘redirect’ will work. I would be telling the server to send visitors from my existing home page (www.mysite.com/index.htm) to another page (www.mysite.com/subfolder/index.htm). Right?

    If so, then how would anyone find the index page with the new content since it would also be named www.mysite.com/index.htm?

    I realize the best solution is to simply get a new domain name, but every one I tried that ‘fit’ my new niche was already taken. I guess I could always come up with some oddball name and trust my page title and description to work their magic with the search engines.

    Or I could … never mind. It all gets too complicated!

    You are welcome to email me directly if I’ve misunderstood your suggestion.

    BTW, sorry if my comments have drifted from your original posting.

    1. Arindam

      @Nan,

      You can learn more about redirects here:
      http://www.webconfs.com/how-to-redirect-a-webpage.php

      The solution of redirect is for “similar” or “related” sites only. If the two sites are not on similar niches then in that case probably a new domain is your best choice :)

  20. Locksmith London

    Very useful post and the first time I’ve heard about Google’s new secure search. I guess they’re trying to force everyone to use Analytics and Webmaster Tools to work out what keywords are driving traffic as no doubt all the third party tracking systems will fail to pick this data up once it’s encrypted (including my own bespoke system … darn it)

    I suppose from a business perspective this makes a lot of sense. Just makes you wonder whether at some point they’ll start charging for access to the data in Webmaster Tools and Analytics!

    Just wondering about point 3 in your post, if you linked your subdomains from your main domain wouldn’t link juice get passed from the main domain to the subs, thereby boosting their ranking?

    1. Arindam

      >>Just wondering about point 3 in your post, if you linked your sub-domains from your main domain wouldn’t link juice get passed from the main domain to the subs, thereby boosting their ranking?

      I do that and that certainly helps with rankings a bit, although I have not noticed any boost in the PR of my sub-domains just by doing this, so I am not sure about the “pr juice” thing. However, the rankings the sub-domains got as a result of this “interlinking” were not enough because most of them were based around competitive niches so I needed more traffic. If your niche has little competition then interlinking might be enough, assuming of course your main domain is old, has a good PR and a solid backlink structure. :)

      As for GA/Webmaster tools, it CAN become a paid service anytime. I never believe that “free will always be free”; that seldom happens. However, if I feel that the rate charged by GA is worth it, I would stay on, else I would quit. E.g., I am a paid subscriber of statcounter and feel the $10 I pay them every month is worth the extras they offer. :)

  21. Locksmith London

    Yep, there’s no such thing as a free lunch!

  22. Rob Barclay

    @Locksmith London

    “Yep, there’s no such thing as a free lunch!”

    Its seems there is for my wife!!

  23. R. Arenas

    I think that there are advantages for this.

    If Google treats sub domains differently all inbound links to our site would be valid as backlinks.

    An example is Softonic