I have made a web-application on my localhost which provides a platform which gives different businesses their own page on that platform. Each business has it's own subdomain.
So, business1.example.com business2.example.com business3.example.com ...
On my localhost, my code just interprets the URL as a string and extracts the subdomain part. If that subdomain is linked to a business in my database the page is served, otherwise a 404 is returned.
This works fine on my localhost. But can this also work on the internet?
- There are an infinite amount of subdomains possible
- sfkojfioej.example.com should work too as URL, but just return a 404.
- The subdomains are not registered in the DNS-records.
Especially the last point bothers me. Is it possible to achieve this without registering each subdomain in the DNS records?