skip to Main Content

I have created a website lets say example.com, now I have a feature that on click of link it should be moved to nav.example.com.
Now the subdomain name can be any name selected by user, so I can not create the subdomain,
So I google and found that wildcard DNS entry with “A” can give access to the account. With this change I am able to ping the subdomain successfully, and also I am able to browse it but It always shows server default page.

I tried many things :
[http://www.dennisonpro.info/simple-multitenancy-with-asp-net-mvc-4/][1]
[http://stackoverflow.com/questions/278668/is-it-possible-to-make-an-asp-net-mvc-route-based-on-a-subdomain][2]
[https://www.digitalocean.com/community/tutorials/how-to-set-up-and-test-dns-subdomains-with-digitalocean-s-dns-panel][1]
I have also added UrlRewrite :
 <rewrite >
      <rules>
        <rule name="CName to URL"  stopProcessing="true">
          <match url=".*" />
          <conditions>
            <add input="{HTTP_HOST}"  pattern="^(?!www)(.*).ebaraati.com$" />
          </conditions>
          <action type="Rewrite" url="http://ebaraati.com/Preview/Index?url={C:1}" appendQueryString="false"  />
        </rule>
      </rules>
    </rewrite>


Any help would be appreciated ?



  [1]: http://www.dennisonpro.info/simple-multitenancy-with-asp-net-mvc-4/
  [2]: http://stackoverflow.com/questions/278668/is-it-possible-to-make-an-asp-net-mvc-route-based-on-a-subdomain

Requirement :
A user can create teams, and every team will have a subdomain associated to it.
Now user1 select a subdomain “teamA”. Now user wants to see team property, member mapping, it will be redirect to teamA.example.com

Now there can be n number of teams, so I can not create subdomain for every team, so I need to set up dynamic domain system.

2

Answers


  1. The A record will point a URL to an IP address. If you have set your main domain name, say example.com to an IP address, you can use CNAME records for the subdomains: sub-domain.example.com

    Unless you have set up hosting for the sub-domain, whos A record you have created, you won’t see anything.

    I am not sure what you are trying to achieve. Can you give more details?

    Login or Signup to reply.
  2. Btw, IIS 10 in Windows 2016 supports wildcard subdomains and you can create such subdomain in Plesk 17.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search