By Frederik
Hi everyone,
I’m trying to figure out how to configure wildcard subdomains using DigitalOcean App Platform.
Here’s my setup:
I have domain.com
serving as my main landing page.
I’d like all dynamic subdomains (e.g. xyz.domain.com
, abc.domain.com
) to point to a different app, not the same one that serves the landing page.
From what I understand, I can’t easily handle subdomain rewrites or routing inside my Svelte app without changing the URL, so I think I need to configure this at the DNS / App Platform level.
Has anyone set up something similar? What’s the best way to configure DigitalOcean so that:
The root domain domain.com
points to one app.
Any subdomain (*.domain.com
) points to another app.
Any guidance would be much appreciated!
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!
Hi there,
I think that you should be able to do that by following the steps here:
But as far as I can tell, you can add a wildcard record to your app’s domain to redirect queries for non-existent subdomains to the domain’s root. Would that work for you or are you trying to point the domains to a totally separate web service?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.