re: What Wait Why: Heroku Doesn’t Want You to be Naked VIEW POST


Another awesome feature of DNS is the ability to specify a wildcard (*) as the subdomain.

I use this configured with nginx running as a reverse proxy on my server, so it can direct a request depending on the subdomain the request was sent to. This allows me to dynamically generate new subdomains and I don't have to constantly update the domain records.

For example: goes to files served from the /var/www/static/xyz folder goes to files served from the /var/www/static/abc folder goes to the NodeJS app running on port 8080
but all of these are guided by the same wildcard CNAME rule.

It's useful to have sites on separate subdomains because they have their own root address space for file references.


Can you please point me to resource on how to do it?

code of conduct - report abuse