Deploying app to a subdomain?

New Replit user. Bought a domain through Replit. First app deploys fine to the root of the domain, but what I would really like to do is keep 1 core domain (Ex. acmeproducts.com) and then deploy different apps to subdomains (Ex. app1.acmeproducts.com, app2, etc). As a personal user, buying multiple domains (one for each app) would be expensive.

Now, I’ve been going round and round with GPT trying to solve this issue for awhile … registering A records, CNAMEs, trying to connect to the subdomain, etc no dice.

I haven’t been able to find any guides on how to do this, so I’m concerned … is there a way to do this? My end goal/hope was going to be to put up a menu at the core domain to link to subapps, and then host each on subdomains.

Any guidance is appreciated!

Typically when you do this @zonearc0 you would be doing so with separate apps in Replit.

Examples:

If you are doing this in separate apps you should be good.

The key is when you are publishing to a subdomain is that you will configure the subdomain in the ‘hostname’ area. So instead of adding ‘@’ you’d add ‘app’ for app.example.com. I believe in Replit this would work where you ‘bought’ the custom domain. Perhaps from the original app where you bought it?

2 Likes

Thank you! I’ll try this shortly.

1 Like

You can also have multiple domains on one app and route each domain to a unique slug in the app. This takes a bit of setup and coding, but it works, quite well in fact.

1 Like