Background: We run a product aggregator site. We list 20k products which will grow to 200k within the next year and also have a section of the site where users can take those product images and create their own montages (this effectively allows users to create their own images).
We want to move the images to a storage server with a custom sub-domain/CDN e.g.
Move images from our existing domain:
to our custom sub-domain/CDN:
We are doing this for two reasons:
- It's a more cost-effective way to store images.
- We want to serve them up faster and speed up the site for the user.
Currently, we plan to keep a copy of the product images on our main domain (
www.example.com/content/product/product1.jpg) but not the user generated ones.
We already have images indexed by Google and good traffic from it. We don't want to lose this traffic. But we also don't want to have duplicate images. Plus, if anyone links to the images on the sub-domain/CDN, we want to retain the 'link juice' to the main domain.
So, my questions:
- Regarding the product images, would it be best to use canonical headers from the CDN back to the main domain? (although this may mean moving to a CDN provider who offers canonical header redirects as our current provider doesn’t)
- Regarding the user generated images, these won't be available from our main domain, only from the CDN/storage sub-domain. So if anyone links to those CDN images directly, will our main domain benefit from the link juice?
- Our preferred method would be to 301 redirect the existing indexed images from our main domain to the new sub-domain/CDN, for example we would 301 redirect
https://media.example.com/product/product1.jpg. The only issue with this is again whether we are diverting possible link juice from our main domain over to a sub-domain?