Question

Setup custom domain and redirect to index.html in spaces's static hosting CDN

I have deployed Vue app using Digital ocean spaces. I have enabled CDN and used a custom domain with an SSL certificate. Everything works expect I have to go to mydomain.com/index.html in order to access my app. If I purely go to just mydomain.com, it tries to list the files in my bucket/space.

I have tried to setup index.html as default using website.json file, but it does not work for CDN. It works with -static url though.


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.

Bobby Iliev
Site Moderator
Site Moderator badge
May 16, 2025

Hi there,

You’re right, index.html routing works on the static endpoint (like your-space.nyc3-static.digitaloceanspaces.com), but not when accessed through the CDN or a custom domain via the CDN. That behavior isn’t fully supported yet.

The DigitalOcean team has noted this as experimental, and they’re still evaluating how static site support via CDN could evolve. Here’s the related idea you can follow or upvote: https://ideas.digitalocean.com/storage/p/host-entire-static-site-from-spaces-like-s3github-pages

For now, if you want proper static site routing (including index.html defaults and 404 handling) with a custom domain and SSL, I’d recommend using App Platform, you get 3 static sites for free, and it handles all of that out of the box.

If you want help with the setup or run into issues, support can also walk you through it: https://docs.digitalocean.com/support/

- Bobby

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.