So I have a website (let say it is example.com) that has it's content managed by Contentful. That includes assets like images and PDFs, which currently can be accessed through images.ctfassets.net/... and assets.ctfassets.net/... respectively.

Now I want the assets to be indexed by the search engines, especially the PDFs, but because the assets are not accessed through example.com/..., search engines will not treat the assets as part of the website hence not indexing it properly. At least, they are not appearing in the Google Search Console of my domain.

Now my question is, is there a way to "hint/instruct" the search engine to associate the assets to example.com? Or is it a common trade-off of using a headless CMS?


This is not a common trade-off of using a headless CMS. This is a limitation of the the CMS you have chosen specifically. Contentful always serves images and assets from a central CDN.

The typical way to deal with this would be to use DNS to point your own subdomains to the CDN using CNAMES:

  • images.example.com CNAME -> images.ctfassets.net
  • assets.example.com CNAME -> assets.ctfassets.net

The CMS would have configuration for supporting this. Their CDN would serve your assets when your subdomains are requested. The CMS would return image and asset URLs that point to your own subdomain.

Then your images and assets would be part of your site. They would show up in Google Search Console as long as you have a property that verified the entire domain (as opposed to a prefix property.)

Unfortunately, Contentful says they don't support this. However their documentation for embargoed assets seems to indicate that maybe it can be done if you change the URLs they give you for assets and images before displaying them: Getting started with embargoed assets - rewriting a single asset | Contentful

  • That's a lot complicated than it has to be. Jan 11 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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