I am configuring a cookieless domain for all my static content, I see a lot of articles and how-to's use the same document root for as their main domain. Why?
This seems like a disadvantage to me, now their content is indexable two places and they have to use robots.txt or some other means to prevent that.
I use a different document root for my cookieless domain, that only contains the static assets. I redirect www.mycookielessdomain.com and mycookielessdomain.com to my main site, and limit crawling of all thumbnails with robots.txt. Originals can be crawled, not thumbs.
Am I doing it wrong? Does my way of doing have some downside which I am not seeing?
Update: I only redirect direct hits on www.mystatic.com and mystatic.com, not the static assets. But I will remove the redirect and add a simple information page like sstatic.net has.
/var/www/main
, static:/var/www/static
. I have a 301 for any direct hits to www.static.com or static.com to mainsite.com. How does this defeat the purpose of the static domain? Any hits on the static files will of course not be redirected. Since the domain has no readable content I figured it might as well redirect somewhere.