CDN URLs

AnguelS
AnguelS Member Posts: 2

Hi,

I am new to Duda and really like the concept so far. One thing I noticed however are the CDN URLs for images and PDFs on Duda sites. For my old non-Duda site I used Cloudflare and every cached URL is beautiful and starts with mysite.com, not cdn-website.com/some_cryptic_number/.

I am afraid this is by design and I need to host at least PDFs on a subdomain so I can send prettier links to my customers in emails. With images it is probably not that easy as I expect that they get resized etc. by Duda. Or are there any workarounds to get nice URLs starting with mysite.com ?

Many thanks in advance,

Anguel

Comments

  • Bruce_McCaughan
    Bruce_McCaughan Member Posts: 60

    This is an often complained about aspect of Duda.

    As far as I know, there is no workaround...other than possibly the cloudflare measures you mention. I have never tried it myself. Not a Cloudfare user.

  • Aj_Cre8
    Aj_Cre8 Member Posts: 339 MVP

    I think @Bill_Sholar may be able to shine some light. I know he is a Cloudflare Guru (or at least I think he is lol)

  • Bill_Sholar
    Bill_Sholar Member Posts: 9

    Well, I use Cloudflare for a number of sites, but Guru? 🙄 But the pdf and image URLs on my sites that are using Cloudflare all start with https://lirp.cdn-website...

    HOWEVER ... nothing to do with Cloudflare, but you can always create a redirect in the Duda site, so a url of mydomain.com/mypdf or whatever will go to the lirp.cdn-web... address, so that can be what you give out or show online.

  • AnguelS
    AnguelS Member Posts: 2

    To sum up, at least for the PDFs my idea is the following:

    1. Put the PDFs on a subdomain (not hosted on Duda), e.g.: files.mysite.com
    2. Point Cloudflare to use its proxy on this subdomain so it can cache the PDFs
    3. Link the PDFs as external files in Duda (as they are on a subdomain)

    This is the best workaround I can think of.

    I will have to leave the images on the CDN as they probably get resized, renamed etc. so nothing to do here, but at least the PDFs will have some normally looking links. You can't give datasheets with those strange CDN URLs to customers or send them in emails. You train people to be careful with suspicious links and then CDN links come in...

    It looks all the website builder CDNs I looked at use such cryptic URLs starting with some strange domain name.

    As I have worked with transparent CDNs like Cloudflare or KeyCDN (https://www.keycdn.com/support/create-a-zone-alias) which at least allows you to use your own cdn subdomain, such links for every document just drive me crazy. Additionally, they will change anytime you remove and reupload the same PDF on your Duda site. Not sure how Google handles such changes.