Mobile app version of vmapp.org
Login or Join
Miguel251

: Configuring the document root on a cookieless domain 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

@Miguel251

Posted in: #RobotsTxt #StaticContent

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 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 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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Miguel251

1 Comments

Sorted by latest first Latest Oldest Best

 

@Miguel251

In the end I could find no good reason why I should have the same document root on my cookie less domain as my main domain. So I didn't.

What I ended up doing was setting up static.mydomain.com, and use that as the origin for a CDN pull zone; images.mydomain.com. The static domain only serves statics over HTTP to the CDN which serves them to my users over HTTPS, same as the website.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme