I have searched and read through a lot of questions regarding this subject, but cannot seem to find anyone that directly addresses my problem.

I have a CDN for all my static images img.domain.net, it's pulling from my main domain domain.net/static/images. I do not store any other content than static images on img.domain.net.

Now; I am unsure what is a better approach with regards to SEO and performance. I see three possible configurations:

  1. Use a canonical header on the CDN domain pointing back to the origin.
    • Won't I be telling the crawler to use the origin URL? Not sure I want that... The whole point of the CDN is to serve the static images.
  2. Block the CDN (img.domain.net) for crawling using robots.txt.
    • This will block crawlers from seeing all content on my pages, which I have read is a bad thing (Blocked Resources Report). So this is probably not a good idea.
  3. Block the origin (domain.net/static/images) for crawling using robots.txt.
    • In my mind this is the best approach, I am not linking to the origin URL anywhere so I will not be blocking content. And all images should now be served from the CDN.

Is my reasoning correct in this?

Of course with option 3 backlinks will point to the CDN, but I'm not sure that is a problem. I have the CDN (img.domain.net) added to Google Webmasters tool. Thoughts?

2 Answers 2


I'd go with the canonical header. The purpose of it would be to tell search engines the preferred URL where the content should be indexed (so you can reap the benefit of any traffic those images send your way).

Where the content should be indexed is not the same (in this case) as where it is served from and a canonical header seems like the appropriate way to make sure it is properly crawled and attributed but I don't think it would have any effect on the functionality of the CDN.


I ended up going for option 3. The origin (domain.net/static/images) is blocked by robots.txt, while the CDN, serving all the images, is open. I've verified both my main domain and CDN domain in Google Webmasters and the CDN image links are used in my sitemap.

Google is indexing my images just fine, and does realize that thay belong to my domain. They are all shown if I google: site:mydomainhere.net.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.