Grow your CSS skills. Land your dream job.

Display only subdomain in URL (Help Please)

  • # November 23, 2012 at 7:53 pm

    Hello Everyone!

    Here is the situation:

    Say I have subdomain like so **subdomain.website.com**
    I want to hide the parent directory from the URL so it simply displays as **subdomain.com** (using the .htaccess as a preferred method)

    Essentially this is a cheap trick to having multiple website names under the same domain and directory. Does anyone have a solution to this? Is it even possible?

    Any help and guidence would be greatly appreciated. Thank You.

    # November 23, 2012 at 7:57 pm

    Definitely never heard of somebody doing this before.

    # November 23, 2012 at 8:10 pm

    @NSR I agree, I’ve never heard of this. Why not purchase a domain? They’re only $5-$30.

    # November 24, 2012 at 12:37 am

    Why would you want that anyway. “IF” it was possible, then there would be confusion because the user would think the site was subdomain.com but it is really subdomain.website.com. If someone owned subdomain.com, they would get that persons website. Not yours. This is a bad idea to even try.

    # November 24, 2012 at 12:43 am

    There is **no way** to make this work. If you *own* both domains, obviously you can redirect one to the other. At that point, however, it is no longer “multiple websites” – it’s *one* website that has several domain names pointing to it.

    Also,

    > I have subdomain like so subdomain.website.com I want to hide the parent directory from the URL

    There is no “parent directory” (no “directory” at all) in that URL. If you meant something else, perhaps you could explain further.

    # November 24, 2012 at 6:32 am

    @TheDoc
    @chrisburton
    Thanks. I’ve never heard of anybody doing this either. Just hoping it would be a cheap fix to serving multiple sites under one domain…obviously not. Think I will just take Chris’ advice and dig up some spare change for the additional domains.

    Thanks to everyone else for the input.

    # November 24, 2012 at 2:27 pm

    I use GoDaddy strictly for my domains. Some people will advise against them but so far I’ve had no issues.

    # November 25, 2012 at 1:26 am

    Hey guys, after doing some further research and talking to a friend of mine, he suggested having a look at the HTML5 History API. Combined with some javascript apparently this can achieve some interesting url altering hacks, some of which can be extremely poor for usability…which happens to be the case for my previous question.

    Therefore, as @chrisburton suggested, I think I’ll be purchasing a few new domains

    Cheers

    # November 25, 2012 at 1:34 am

    @NSR Just to be clear, you’re not going to host the same content for each domain, correct? I’m still confused by the nature of your question.

    # November 25, 2012 at 10:22 am

    @NSR – I’m glad you are choosing to purchase the domains because hacky attempts at changing the URL are never a good idea as far as I’m concerned. To anyone who notices the hacky nature of the URL, its a red flag. I’ve seen hacky URL stuff kill SEO and as you pointed out, usability can be impacted.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".