I have an application developed in dot net core 5.0 with the domain india.com
Now I have to bind dynamic subdomain to domain india.com.
Example: br.india.com, sa.india.com, rs.india.com, ax.india.com, .... and so on.
Challenging work is that I want all subdomain binding dynamic it won't be static. that will be handled from the database.
Anyone could please help me. Thank you in advance.
Base of your Webserver (IIS, Nginx,...) is difference:
IIS: web.config need add rewrite role :
Redirecting a domain to a subdirectory
Nginx: