Domains, Sub-Domains, and Databases

Discussion in 'Hosting Services / Control Panel' started by MattJB1980, Nov 8, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hey guys and gals,

    First off, let me say that this is a GREAT setup you guys have here! I?ve been through a few different hosting companies and by far DiscountASP has blown my socks off! So thanks for putting together a team that actually focuses on ASP.NET users.

    I?ve just recently started programming websites (with my focus really being on DB?s) so there is lot about this world that I am completely ignorant to. However, I know NOTHING about SERVERS so please bear with my ignorance and entirely noobish nature. I?ve read through this forum regarding domains and sub-domains and I would just like some clarification.

    For this post I will be using the following examples:

    www.a.com
    www.b.com
    www.c.com

    From what I can determine reading through the forums, in ONE single hosting account, you are only allowed to have ONE domain. In this case it is: www.a.com. However, you are allowed SUB-domains by purchasing Domain Pointers. A Sub-Domain will have the visual appearance in a browser window like this:

    www.subdomain1.a.com

    Now I also read that you CAN have multiple Domains in ONE hosting account but your emails, web-stats, etc would not be shown as INDIVIDUAL items. For instance:

    My DiscountASP account is registered through www.a.com, but I also have registered www.b.com and www.c.com. I can build a ?sniffer? (I have NO idea what that is) that can redirect URL requests to EACH of those individual domain names. However, if on ANY of those pages there is perhaps a CONTACT US link which generates an Email ? that email will have to be scripted to go to [email protected], NOT [email protected] or [email protected].

    Now if I didn?t need to see individual website stats and I don?t need individual email address? PER domain, how would I accomplish this? Because, honestly? I really _don?t_ care about individual stats. I just care about the stats and email items of www.a.com. And when I ask ?how would I accomplish this?, I guess I?m looking for a step-by-step process here? because I thought I was the hotness when I actually registered a Domain name! Yeah? that?s how cool it was! Really guys, I?m a noob here!

    Also, I?ve heard that I may have Database issues if I?m trying to connect objects in www.c.com with a database in www.a.com. My previous host said it wasn?t an issue. But I don?t know about DiscountASP. I would imagine it wouldn?t be an issue, but I thought I?d ask here because it ties in with my Domain/Sub-Domain questions.

    Here?s an example of what I?m trying to accomplish:

    www.a.com is the ?master site? with a DB attached to it.

    www.b.com and www.c.com are satellite domains with objects that need to report back to www.a.com.

    Now, as long as my connection string is configured appropriately in each satellite domain, is it possible to ensure the data that?s being transferred from www.b.com and www.c.com get to www.a.com?s database without issue?

    I know it?s a drawn-out post, but I?m trying to put as much inquiry into ONE post as I can to prevent MULTIPLE posts and to hopefully help new folks such as myself from asking additional questions.

    Thanks again guys and gals! You?re all the best!

    Regards,

    Matt B.
     
  2. Hi,
    I've been meaning to create a Webcast on this and should kick myself for not having it done...
    Because this topic does come up a lot, as you may have noticed.

    Were you drinking Espresso when you wrote all that? [​IMG]
    (I'm an Espresso addict....)

    There is a lot of fact to what you wrote but you appear to be lost on a few things.

    1. Multiple domains can use the same SQL Server here, they are not related to your site or the domains.
    2. You can create Application folders in your Control Panel as needed.
      Sites "A" and "B"can havetheir own Server Application to ease out the mess that can result.
      http://kb.discountasp.net/article.aspx?id=10181
    3. You don't need sub-domains to pull off what you want but they do make it easier.
      You can have a root domain and add Domain Pointers to your same site, then treat the pointers as needed.
      http://kb.discountasp.net/article.aspx?id=10102
    4. Sniffing is where that part comes in. What it does, via your own code, is detect the imcoming URL request.
      Say for example I have a Gaming site KickingIt.com and I also host a Non-profit org site named wearehere4you.org
      I can write code in the root of my gaming site so I send visitors to folders or sub-domains as needed.
      The users never need to know the other site is there.
    5. DiscountASP.NET recently made some changes for Email. Domain Pointer Aliases. (Very cool)
      http://kb.discountasp.net/article.aspx?id=10597


    Hope that helps a bit.
    Salute,
    Mark






    Technical Evangelist for DiscountASP.NET
    http://www.iis7test.com/webcasts/
    http://weblogs.asp.net/markwisecarver/
    http://blogs.windowsclient.net/wisecarver/default.aspx

    (Microsoft IT Usability http://msitusability.multiply.com/)
     
  3. Wisemx,

    Dude, I think I love you.

    Yes, you need to put a Webcast together like? RIGHT NOW!

    Yes, coffee is good. Coffee is my friend. *repeat as necessary*

    So based on your reply I can ascertain the following:

    I registered www.a.com with 1and1 ? DNS forward it to my new DiscountASP host account as my default domain. I upload www.a.com?s files from my local to the root folder of my new account; adjust the automatic file read from index.htm to default.aspx and ?GOOD LORD I SEE MY SITE AT WWW.A.COM!?

    Cool?

    But wait? I also have:

    www.b.com registered at GoDaddy and www.c.com registered at DiscountDomain and now I need to host these through DiscountASP!
    So I create two new subfolders in my Root Directory:

    /SiteB

    and

    /SiteC

    I upload the individual sites from my local to their new subfolder homes and adjust the DNS settings on each Domain to point towards DiscountASP. I also have to ?CREATE APPLICATION? using the DiscountASP File Manager for each subfolder.

    (The following part I?m a little fuzzy on)

    Then I need to create two (2) Domain Pointers ? one for each app. I have no idea what that is, but that?s okay. Thus far, creating things on DiscountASP?s control panel has been relatively easy.

    The next part is to hardcode a ?Redirect Script? into www.a.com?s DEFAULT.ASPX page that can point incoming requests/users to the site they need to go to.

    A user types in www.c.com to their browser. In all reality, they are being sent to www.a.com, but the default page script in www.a.com/default.aspx picks up that request and auto-forwards them to www.c.com.

    Hence, the user never even knows they?re actually sitting in a sub-folder of www.a.com.

    Did I get that right?

    Thanks in advance for your help, brother!

    Who dah bomb? YOU DAH BOMB!

    Regards,

    Matt B.
     
  4. Cute kids! Love kids! Have one myself. He's a little 18 month old monster. Much like Spiderman as well.

    Okay, so Application Set-Up is optional - but recommended.

    Sub-Domains are more common today, so it isn't really an issue to have www.subdomain.domain.com. However, if you DON'T want that look, you need to Order a Domain Pointer.

    From what I gather, Domain Pointers are actually very simple.

    A Domain Pointer costs $15 for Set-Up. What it does is basically re-direct a URL request to your server. For instance:

    www.DomainPointer.com is registered with GoDaddy. It's really just a registered Domain - no site. I go to GoDaddy and adjust the DNS settings from their defualt to DiscountASP's DNS settings (below):

    NS1.DISCOUNTASP.COM
    NS2.DISCOUNTASP.COM
    NS3.DISCOUNTASP.COM

    I also put in a REDIRECT scipt for that page to point to my DiscountASP main Domain. In this case, it is: www.DASPDomain.com

    Then, I go to my DiscountASP Control Panel. I purchase (or Order) a Domain Pointer for www.DomainPointer.com. At this point, it will take DiscountASP some time to set the DomainPointer up. During this time (since I am on an ISS7.0 server) I then launch IIS7.0 Manager on my local.

    From the IIS 7.0 Manager I can then create a new folder in my root called /DomainPointer. I upload all the site ASP.NET files from VWD 2008 to that folder.

    At this point, if I were to open a Browser window and type in: www.DASPDomain.com/DomainPointer it would take me to the Default.aspx page of that folder.

    (sketchy area)

    Once the Domain Pointer has been set-up, what do I do from there?

    I'm sure I have to create a REDIRECT / REWRITE script on my www.DASPDomain.com 'Web.config' file to let the sever know that when a URL Request comes in for www.DomainPointer.com a few things need to happen:

    1: Re-Direct the request to: www.DASPDomain.com/DomainPointer
    2: Re-Write the request to: www.DomainPointer.com

    Any further help I could get in this arena would be wonderful and appreciated!

    Regards,

    Matt B.
     
  5. Hi,
    There are several ways you can do this.
    If none of your sites will be in the site root it makes it easier.
    The default page in the root just acts like a traffic cop.

    I did that for awhile here with two large communities.
    Neither of them had the root domain, neither had files in the root.
    Made it easy for me to direct imcoming requests and to keep the sites seperate.

    If you added the pointers today I'd expect them by mid-day tomorrow at the latest.
    Salute,
    Mark


    Technical Evangelist for DiscountASP.NET
    http://www.iis7test.com/webcasts/
    http://weblogs.asp.net/markwisecarver/
    http://blogs.windowsclient.net/wisecarver/default.aspx

    (Microsoft IT Usability http://msitusability.multiply.com/)
     
  6. Wise,

    Can I ask a dumb question?

    Okay... so what 'exactly' does a Domain Pointer do?

    I don't mean to offend... but in the past with working on hosts like one and one I simply needed to add a site through the control panel and then purchase the domain registration.

    Hows is a domain pointer different than that?

    Or... should I just register my new sites with DASP and then negate the Domain Pointer fee?
     
  7. Hi,
    The DiscountASP.NET staff would be better to answer specifics regarding this.
    From our perspective what happens is DASP has name servers that handle domain directing.
    If we add the DASP name servers to GoDaddy for example they only make it as far as the name server, not our sites.
    Our site has a root domain, DASP gets a very modest amount from us to add additional pointers for additional domains.
    It's like ordering a Pizza, you get the cheese, if you want yummy mushrooms you have to add it and pay a little extra. [​IMG]

    The Pizza analogy is making more and more sense nowadays with the prices of everyday stuff.
    I battle in the ASP.NET forums for DASP all the time with Devs who think $95 a year is too expensive.
    Heck, most everyone was paying $85 to fill their tanks this summer. [​IMG]

    I don't get any $$ from DASP but will still stand in their defense for the tiny little domain pointer fee they charge.
    Don't think I'm suggesting you think it's too expensive, I'm just rambling. [​IMG]
    Salute,
    Mark






    Technical Evangelist for DiscountASP.NET
    http://www.iis7test.com/webcasts/
    http://weblogs.asp.net/markwisecarver/
    http://blogs.windowsclient.net/wisecarver/default.aspx

    (Microsoft IT Usability http://msitusability.multiply.com/)
     
  8. Mark,

    Your answer was direct and to the point. That is what I needed to know.

    From what I was hearing, it sounded like the Domain Pointer was as simple as an additional charge to re-route requests. And if that's the case, so be it.

    The Pizza analogy is indeed the most accurate.

    Thanks much for the information.

    I will now be shutting down my account. :p

    Nah... just kidding.

    I'm going to go order me some domain pointers.

    Regards,

    Matt B.
     
  9. Hiya,
    You remind me of my youngest son, take a look at this video of my 3 kids...
    Lucas is the one I'm referring to and he gets his face right in the camera.
    (He's all over me throughout the day, it's like living with Spiderman!)
    http://www.youtube.com/watch?v=oxOTR1wIcds



    OK, note first of all that the Application step is not required but I do suggest it.
    Reason being it can help to make your site branches play well with each other.
    Always keep in mind each of us are on Shared servers here so that part is essential.


    Now adding sub-domains or not is up to you, some of your visitors may already expect that part.
    You see it all the time now so it's no shock to anyone.
    If you don't use sub-domains the way to go is with Domain Pointers.
    Please understand you can use sub-domains even then, but you also can get by without them with Pointers.
    How? OK, all of my domains are hosted with Godaddy.


    I manage all of them there, then ask the DASP support to add any I need as Domain Pointers.
    Then once they are pointed to DASP servers, by me, and Support has added them, I can use them as I want.
    See how that works? You still have one Root Domain, the others can all be Pointers.


    Did you get an IIS7 server for your account? If so you have even more options.
    The new IIS7 URL Rewrite module from Microsoft is installed on the IIS7 servers here, and it's very cool.
    http://learn.iis.net/page.aspx/460/using-url-rewrite-module/


    Whatever you need can be done, don't fret.
    Salute,
    Mark











    Technical Evangelist for DiscountASP.NET
    http://www.iis7test.com/webcasts/
    http://weblogs.asp.net/markwisecarver/
    http://blogs.windowsclient.net/wisecarver/default.aspx

    (Microsoft IT Usability http://msitusability.multiply.com/)

    Post Edited (wisemx) : 11/9/2008 2:19:03 AM GMT
     
  10. Cool [​IMG]
    Always keep in mind you get the very best Shared Hosting (Gold Microsoft partner)...
    And a nutty guy by the name of "wisemx" who goes out of his way to keep it fun. [​IMG]
    Salute,
    Mark Wisecarver

    P.S. The name "wisemx" came from my work at Siemens AG.
    Was my network name there, U.S. and Germany, and it just stuck.



    Technical Evangelist for DiscountASP.NET
    http://www.iis7test.com/webcasts/
    http://weblogs.asp.net/markwisecarver/
    http://blogs.windowsclient.net/wisecarver/default.aspx

    (Microsoft IT Usability http://msitusability.multiply.com/)
     
  11. Okay,

    So Noob Attacks again.

    I've got me a Domain Pointer.

    Now... how do I get people to go to my new directed Domain.

    What do I need to setup through the DASP Control panel to ensure that when people type in www.newdomainpointer.com, they go to the right domain?

    Thanks much!

    Regards,

    Matt B.
     
  12. Hi,
    Once you have Pointers you don't have to set anything up in the CP.
    Except maybe default pages but that's just another little thing to check because it is all setup.

    Then with either classic ASP or ASP.NET in your root default page you check the incoming domain request.
    At that point the code is pretty quick and visitors shouldn't even notice if you do it right.
    Use my Code Cops below and search for some examples if you need then.
    There's also an ASP.NET example in the DASP KB.
    http://search.live.com/macros/wisemx/aspnet/?FORM=OIJG
    http://www.google.com/coop/cse?cx=009244845836111659857%3Albvxsjj8mho

    Those links are safe to hit, the Google Coop will probably find more code examples.
    Salute,
    Mark



    Technical Evangelist for DiscountASP.NET
    http://www.iis7test.com/webcasts/
    http://weblogs.asp.net/markwisecarver/
    http://blogs.windowsclient.net/wisecarver/default.aspx

    (Microsoft IT Usability http://msitusability.multiply.com/)
     
  13. Okay, so I'm not asking to be spoon fed information here... but I cannot find _ANY_ code examples that will fit. Most of them I'm finding are for sub-domains. This is not my case.

    I'm getting pretty frustrated here because it seems like this SHOULD be simple code to come across.

    The domain in question is hosted at 1and1 and I've changed the DNS settings to the appropriate DASP settings. There is also an option to HTTP Redirect and I've sent that to my main host account domain.

    What I HAVE read about hosting multiple domains is that typically there is a: 'Point THIS Domain to THIS Sub-FOlder and point THAT Domain to THAT Sub-Folder' option in the CP. DASP doesn't have that.

    So it comes down to code. Again... I hate asking to be spoon fed here... but this seems like a very simple request... so I'm not sure why I'm having such a difficult time tracking it down.

    Thanks in advance.
     
  14. Hi,
    The DASP crew gives us more freedom but yes some hosts do have that CP feature.
    Give me specifics on how you want to handle it and which code language you'd like it in.
    Classic ASP or ASP.NET that is, I don't write PHP.
    I need to create a Webcast for this anyway, it's been on the list for awhile now.
    Salute,
    Mark



    Technical Evangelist for DiscountASP.NET
    http://www.iis7test.com/webcasts/
    http://weblogs.asp.net/markwisecarver/
    http://blogs.windowsclient.net/wisecarver/default.aspx

    (Microsoft IT Usability http://msitusability.multiply.com/)
     
  15. Wise,

    Would you mind if I sent you the specifics in a PM (ie: folder structure, site names, etc)?

    At that point, I'd be more than willing to post the answer with some 'default' information.

    Thanks.

    Matt
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page