Question

How to point custom domain to DigitalOcean without changing NameServers (NOT DROPLET)

Hello everyone, I have DigitalOcean Spaces storage, and I’d like to point my domain to it. However, my domain is by default pointed to my website, and I’d like to have the CDN under cdn.mydomain.com. My domain already has Vercel nameservers. How can I make my domain point to CDN without changing the nameservers? I read that when using droplet I’d need to add an A record with the IP of my droplet, however like I said before I’m using DigitalOcean Spaces, not droplet. Thank you.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello,

You could add your subdomain name to your DigitalOcean account directly. Then that way it will show up in your domains list when you try to specify it as a custom domain for your Spaces.

Then in your Vercel DNS zone, you will have to add the DigitalOcean nameservers as NS records for your cdn subdomain in the DNS Manager for your main domain.

For Example: In DNS Manager for main add NS records Like.

cdn.example.com. 1799 IN    NS  ns1.digitalocean.com.
cdn.example.com. 1799 IN    NS  ns3.digitalocean.com.
cdn.example.com. 1799 IN    NS  ns2.digitalocean.com.

That way you will be able to manage the DNS for the cdn. subdomain on your DigitalOcean end.

Hope that this helps.

Best,

Bobby