I would like to know how to create a subdomain that is a link to an SQL Server database. I have Windows Server 2008 R2 and SQL Server 2008. I have a static IP on the Windows server, and I have a domain at GoDaddy with the A host record pointing to the static IP.

I can successfully establish a remote connection to the SQL Server instance through SQL Server Management Studio. But I have to use the www.mydomain.com instead of something like sqldbmain.mydomain.com, which is what I would prefer to use.

For another example, if I create a SQL database at some web host like GoDaddy, they give me an external link to my DB like sqldb1234.db.hostedresource.net. That is what I'm trying to replicate.

I'm not sure whether this is something that has to be managed through IIS on the Windows server, through the domain management at GoDaddy, or through SQL Server management, or even a little bit of all of them.


For clarification, I'm accessing the database through SQL Server Management studio. In the field where it asks for the "Server Name" is where I enter www.mydomain.com, but I would like to enter the value similar to sqldb1234.db.mydomain.com.

  • How did you access the SQL Server database through a browser previously (i.e., using the IP address)?
    – dan
    Nov 20, 2013 at 1:31
  • @dan: Please see my edit.
    – jwatts1980
    Nov 20, 2013 at 14:38

1 Answer 1


You need to create an A record for sqldb1234.db in your DNS area for GoDaddy.


Once the A record has propagated you should be able to use the subdomain sqldb1234.db.mydomain.com in your connection string.

  • Thank you. That sounds very promising; I will try it. I am curious, if create that A record and it points to the same IP as the @ record, then will sqldb1234.db basically be an alias to the www? I mean, wouldn't www.mydomain.com and sqldb1234.db.mydomain.com both allow a successful connection to the database?
    – jwatts1980
    Nov 20, 2013 at 17:01
  • That was what I needed. I understand now why it helps to use the A host record. Since I can control which IP the subdomain points to, if I need to move the SQL Server to a server with a different IP later, then I can just update the IP in A record and my URL stays valid. All the little dots are connected now :) Thanks again!
    – jwatts1980
    Nov 20, 2013 at 17:39
  • That's right! Glad I could help :)
    – QFDev
    Nov 20, 2013 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.