Search code examples
amp-htmlaccelerated-mobile-page

Images on different domain not working with new google AMP cache url based on subdomains


My amp pages use images served over a different domain (using Imgix)

This works fine using the old url for the google amp cache but when I try out the new subdomain based cache urls its not working because it can't resolve the DNS for subdomain that the images are being served over.

So this works: https://cdn.ampproject.org/c/s/www.timbuktutravel.com/amp/country/botswana-safari

But the images don't work here https://www-timbuktutravel-com.cdn.ampproject.org/c/s/www.timbuktutravel.com/amp/country/botswana-safari

Its because the images caren't getting their DNS resolved for example: https://timbuktutravel-imgix-net.cdn.amproject.org/ii/w470/s/timbuktutravel.imgix.net/trips/kodak_images/000/000/062/original/wild-dogs-game-drive-okavango-delta-botswana-timbuktu.jpg?w=235&h=235&fit=min

Any ideas on how to tackle this? How can I tell google it also needs to route requests for image host in addition to my normal server


Solution

  • There is nothing wrong with your AMPs. Your AMPs use images from a different domain, which is not yet supported by the AMP Cache for the new sub-domain-based URL scheme.

    There is nothing to worry about, as the AMP Cache still uses the old URL scheme. We plan to add support for resources being served from different domains later this week.

    Note: I work in Google Developer Relations.