Skip to content

CDN: Naming Conventions

AWS Resources

Every single resource should be prefixed in AWS when it is related to and only to a CDN resource.

Ex.: Lambda function that are used for serverless actions in CDN should be named as "CDN--function-name".

Files

Rule of Thumb

Files cached under Content Delivery Network MUST BE versioned using image pipeline in our stack. Except for static ones (they can be, but dont need to. Check next section for further clarification).

versioning: practice to add a hash to the image so it will not have the same name when its content is modified. It will also produce the same hash when the file keeps untouched.

What about static files?

It doesn’t make much sense to add manually hash to image names for static content like icons, logos, etc. But, be aware, cache must be invalidated/purged. - Check out the CDN Cache Reset.

Content versioning x SEO

So far there is no concrete that presents issues regarding assets versioning (e.g. adding a hash https://google.com/images/logo-a5f8sGz4.png).

Major websites do use versioning strategies and crawlers are smart enough to match image file name (meaningful part) to its surrounding content.

Tested tools did not report versioned assets as a problem!