Reply to topic
Why use a domain alias?
Groll


Joined: 23 Dec 2004
Posts: 27
Reply with quote
Question What feature does a domain alias do for your website? It looks like a subdomain, but without the capability to store files seperately.

How I set it up...or can I...so that when someone enters <alias>.mydomain.com that it goes somewhere specific, even a subfolder underneath the current root web?
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1029
Location: Felton, Delaware
Reply with quote
For that you need to be able to use Host Headers... something HMS does not support. It's in their TOS.
cpnet


Joined: 03 Nov 2004
Posts: 135
Reply with quote
Actually, it looks like we can sorta do this now. If you go to your control panel, under the new "DNS Administration | Basic DNS Manager", there's an option to, "Add an alias to my website. Example: admin.MyDomain.com".

Basically if you add this, someone can now get to your site by using "http://admin.yourdomain.com", instead of just "http://yourdomain.com", or "http://www.yourdomain.com". However, even with this alias, they'll still end up in the root of your regular website (i.e. at "http://www.yourdomain.com".

But, if you use ASP, or some other server-side scripting in your home page (i.e. default.asp), you can (usually) find out the URL that was used to get to your site. Then, your script can automatically redirect people that type in "http://admin.yourdomain.com" to "http://www.yourdomain.com/admin". I think that depending on the browser, you may be able to get this displayed as "http://admin.yourdomain.com/admin" in their browser once they're redirected. However, if you do this redirection, regardless of the server/domain that's displayed, you'll still see the /admin (or whatever) subfolder in the URL that they've been redirected to.

So, it looks like you can set up pseudo-subdomains now.

BTW, I was doing some reading on the Google site about how they rank your site, and they claim that they don't like it when sites are broken up into subdomains, so using subdomains _may_ impact your google rank.
Groll


Joined: 23 Dec 2004
Posts: 27
Reply with quote
Yea, but what's the point of it? I mean, if it just goes to your root web, what's the reasoning behind it? I would understand the subweb portion, but since it's not an option, it just seems unneccesary.

Am I way out on a limb here?
cpnet


Joined: 03 Nov 2004
Posts: 135
Reply with quote
I suppose one possible reason is to make it easier to tell people about your URL. It's probably easier to tell someone (over the phone say) to, "go to support.mydomain.com", rather than to say "go to www.mydomain.com 'forward slash' support".

It may also make it easier to partition your site among multiple servers in the future.
Alan
HostMySite Marketing

Joined: 08 Mar 2004
Posts: 126
Reply with quote
One reason for using domain aliases as you described is for subfolder hosting, which we do not support directly on the web server. As was mentioned you can create a script that will perform the redirection to a subfolder. Another reason people use it is to specify their website in a different way. For example, if I have an admin section of my website and I want people to view it securely I can create secure.domainname.com and give people the following link https://secure.domainname.com/admin. They could just as easily go to https://domainname.com/admin, but it looks nicer. Unless you are performing a redirect, the domain alias is mainly for show.
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
What I use DomainAliasing for is for running multple sites off of one DotNetNuke installation

I have 3 domains that all point to one hosting plan - DotNetNuke is intelligent enough to note which actual site people were looking to get and serves up the correct pages for that specific site.

You can do a lot of cool things with domain aliases...

Easiest example is probalby if you own
MyDomain.com
MyDomain.net
MyDomain.org
and want them all to go to one place....

you set up ONE of those domains with the actual site, and alias the other domains to it so they all point to one place, but it's done serverside with no redirects etc...and when people type in .org or .net or .com - it doesn't change them to the main one you set up - their address will stay .net, .org, or .com - whatever they typed in
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1029
Location: Felton, Delaware
Reply with quote
ASP
Code:

<%
   
    Dim sURL, sPath
    ' Get the domain name typed in the browser.
    sURL = Request.ServerVariables("HTTP_HOST")
   
    ' Get the rest of the path after the domain name.
    sPath = Request.ServerVariables("PATH_INFO")
   
    ' Based on the domain name, redirect the user
    ' to the correct directory and attach the rest
    ' of the path.
    Select Case sURL
       Case "www.maindomain.com", "maindomain.com"
          ' Ignore...this is the current site.
       Case "www.domain2.com", "domain2.com"
          ' redirect To the "domain2" directory
          Response.Redirect "domain2" & sPath
       Case "www.domain2.net", "domain2.net"
          ' redirect to the "domain2net" directory
          Response.Redirect "domain2net" & sPath
    End Select

%>
Why use a domain alias?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic