Mobile app version of vmapp.org
Login or Join
Lengel546

: Serving images on CDN; allow crawl of origin or CDN or both? I have searched and read through a lot of questions regarding this subject, but cannot seem to find anyone that directly addresses

@Lengel546

Posted in: #CanonicalUrl #Cdn #RobotsTxt #Seo

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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Lengel546

2 Comments

Sorted by latest first Latest Oldest Best

 

@Miguel251

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.

10% popularity Vote Up Vote Down


 

@Murphy175

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme