How to configure Azure CDN

Stephen Herz asked on September 16, 2022 01:03

I'm using Kentico v13.0 hosted on Azure app service.

We are currently using Azure blog storage for our media assets. I would like to add Azure CDN to cache static files. I've followed the instructions here, with Miscrosoft CDN Classic, origin type 'Storage' and origin host name that points to my blob storage location. I've then updated my Admin web.config file as instructed.

All my image assets are being served using /getmedia/xxxx/x.jpg. However, I still see the URL coming up in the web logs and when looking at my CDN I see no hits when looking at the metrics for the CDN. I can browse to my assets directly when using the Endpoint URL and see the hits record in the metrics, just not when browsing the site directly.

What did I miss in my set-up?

Recent Answers

Dmitry Bastron answered on September 16, 2022 15:52

Hi Stephen,

I guess this could be a weird one, but in v12 Azure CDN was only working when image URLs were NOT in a permanent (/getmedia/xxxxx) format. And it wasn't mentioned anywhere on the documentation. There was a setting "Use permanent URLs" here.

Now, this setting was removed in v13 and you cannot switch back to folder URLs, I don't think so. But the article regarding Azure CDN setup was copied over from the previous version. Could you reach out to Kentico support, please? Hopefully, they will be able to advice on how to set up this correctly, if it is possible at all.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.