Subdomains programmically

Discussion in 'Site Programming, Development and Design' started by zoinky, Dec 2, 2010.

  1. Do we have extra permissions in order to create subdomains programmically?
    I need to create about 300+ subdomains, and doing this manually is just wont work, any way to do this with permissions provided to us already or do i need to do something special to do this

    any help would be appreciated
    thanks
     
  2. Ray

    Ray

    No, I'm afraid not. That is because you will need direct access to the DNS server so that the appropriate entries to the A record can be created and then you will need direct and admin access to the IIS 7 server so that you can setup the proper host header names. Because we are a shared hosting environment, our security settings will prohibit this.
     
  3. thanks for the answer Ray,
    so what is the fastest way I can get around this other than doing them one by one?

    thanks

    edited... after looking at different options, one way is if the dns server/hosting company supports wild card dns'ing, does Winhost.com support wild card dns's? if yes then I can develop my solution around this.
     
    Last edited by a moderator: Oct 14, 2015
  4. Ray

    Ray

    You can do it one by one, or if you go through the process of installing a SSL certificate on your account then you will get a static/unique IP address, then you can create an A record with *.domain.com and point it to that static/unique IP addres. I am assuming you do not have a SSL certificate installed and thus you have a static/shared IP address. And that is why you need to also create a host header name. If you go this route obviously your cost will increase to install the SSL certificate and you will need to be either on the Max or Ultimate plan. You cannot install a SSL certificate on the Basic plan.
    So you will need to decide what is your primary business need and what will your budget allow you to do.
     
  5. I shouldnt need SSL for the wild card domain.
    all you guys have to do is setup wild card subdomains and I will take care of the rest code wise
    i already added *.houseme.ca subdomain and pointed at the ip, now i just need this done on the dsn server.
     
  6. Hi

    I'm in a similar situation - I want to be able to route (redirect then rewrite) requests from subdomain.domain.com to domain.com/defaultpage.aspx?sd=subdomain, then rewrite as subdomain.domain.com.

    I have the Winhost max plan, no SSL certificate.

    I've added the DNS entry (A) for *.domain.com

    Also added the following redirect rule with IIS 7 URL Rewrite tool:

    <rule name="test sd" enabled="true" stopProcessing="true">
    <match url="(.*)" />
    <conditions>
    <add input="{HTTP_HOST}" pattern="^(^.*)\.domain\.com$" />
    </conditions>
    <action type="Redirect" url="http://domain.com/defaultpage.aspx?sd={C:1}" />
    </rule>

    This works only if there is an actual physical sub domain created in Winhost CPanel.

    When I test it with any sub domain (non-existent) I get a page with the following message:


    Web Page is Unavailable
    We are very sorry.
    The web page you are trying to reach is unavailable.
    Please contact the Website Administrator.
    We apologize for the inconvenience.

    When there is no *.domain.com A record in DNS there is a Server not found error when trying to access a non existing (dynamic) sub domain.

    Would a SSL certificate resolve this? Please advise.
     
    Last edited by a moderator: Oct 14, 2015
  7. Ray

    Ray

    Yes, you will need to order and install a SSL certificate. To create a wild card subdomain name *.domain.com, you will need to have a unique IP address. And you can only have unique IP address if you have SSL installed.
     

Share This Page