Change custom domain — need more info please

In a project’s settings, I noticed I can use a custom domain. A client then requested it, so we have added a CNAME pointing to admin.datocms.com with a value of admin so it’d be accessible at admin.vjraystrata.com.au. This was set mid-last week.

But still today it isn’t working:

DNS is confusing, so what am I missing here?

Actually, what the client wishes for is that asset URLs are seen to be related to the business.

Updating their Dato URL isn’t going to change that, is it?

For example, they want something like https://dato.vjraystrata.com.au/14001/1564024265-steven-coffey-e26tf5jpcmi-unsplash-cut.jpg instead of https://www.datocms-assets.com/14001/1564024265-steven-coffey-e26tf5jpcmi-unsplash-cut.jpg

I guess that’s not possible. But I’ll ask anyways…

It is possible @callum https://www.datocms.com/docs/guides/custom-assets-domain

But it’s an “enterprise” feature normally. We can add that to the Pro plan, but it will have an extra setup cost. If you are interested plese be in touch at https://www.datocms.com/support/

About the DNS instead I’ve just tested myself now and the CNAME for admin.vjray.com.au is pointing to alias.zeit.co are you sure? The panel you are showing is for another domain (and the CNAME is not responding as expected here as well).

Let me know if you need more help here!

Thanks @mat_jack1, I’ll let the client know :slight_smile: Good to know it’s available.

*.vjray.com.au does indeed have an old Zeit DNS setting issue (no ID, so I can’t delete it) but that’s a separate issue from admin.vjraystrata.com.au

I was trying that domain as I saw that in your screenshot.

The other one doesn’t have a CNAME record attached if I query that DNS from my machine :frowning:

Are you getting the right result by doing something like dig CNAME admin.vjraystrata.com.au?

@callum Another option, if your client is desperate for a vanity asset domain, is to proxy through Netlify. Their rate for bandwidth is ok as long as your project isn’t too big.

I had a long discussion with Netlify support on the pros and cons of this and it will work but basically you’re fighting for space in their edge node caches, so depending on how frequently your assets are hit, Netlify may serve a cache miss every time. Then again I’m not sure whether the dynamics are much different using Imgix directly (just no second fetch from Imgix › Netlify), so it may be a workable solution. You’d have to set it up and measure latency etc to find out whether it would work for you.

2 Likes

@webworkshop did you do that before? Is it something that you can simply do by fiddling in Netlify’s interface?

You need to create and upload a redirects file, but it’s easy: https://docs.netlify.com/routing/redirects/rewrites-proxies/.

The other aspect to this that you should bear in mind is that if your site isn’t popular enough that requests for its assets are hitting Netlify’s cache, since Netlify will hit Dato’s Imgix instance in addition to the latency of the extra request you’ll be paying double for bandwidth.

It was at about this point that I gave up and just used the regular shared assets domain. Depending on your use case, you could suck in assets at various standard sizes from Dato’s Imgix instance during your build process, and host them with the rest of your site.

2 Likes

Thank you for this, interesting!

Thank you @webworkshop, made a note of this method. Cheers!