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