6

Is it possible to dynamically add subdomain names to a custom domain that is pointing to your heroku app?

For example, you're creating an app that allows users to create their own pages. Let's say www.example.com is pointing to your heroku app and a user named John makes a page and your app creates john.example.com that has johns content.

For node, can you do this through routing in express?

1 Answer 1

5

Yes. You can indeed dynamically add domains to your Heroku app using the Heroku Platform API. Here's a link to the exact bit you need: https://devcenter.heroku.com/articles/platform-api-reference#domain

You can then read in the domain data via the node request object (req.url, I believe).

Sign up to request clarification or add additional context in comments.

1 Comment

How would one deal with SSL for these websites for their customers? similar to the way that Squarespace provides SSL certificates for their customers and their custom domains. Does a new SSL certificate need to be purchased for Each one?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.