Results 1 to 4 of 4

Thread: Shared server question

  1. #1
    License owner
    Join Date
    Feb 2012

    Default Shared server question

    Hi, I wonder if you guys can help me out with this one.

    I have a hosting package with several domains, but they all go into one single public_html folder. When I want to create another website next to my main one, I put it in a seperate folder in my public_html.

    Now, here's the problem. My main website is My second website shows up as, but also as This is also in Google results and it doesn't look very professional.

    Is there a way to get this sorted out? The guys at my hosting company talked about editing robots.txt or doing a Htaccess Rewrite. I don't really know how to do all that. My scripting knowledge doesn't go that far.

  2. #2


    Create a file named robots.txt in your root and place the following in it:

    User-agent: *
    Disallow: /secondwebsite/
    Disallow: /somethingother/

    With this you are blocking /secondwebsite and if you want /somethingother for every crawler, if the crawler recognizes this file which every trustfull does.

  3. #3
    License owner
    Join Date
    Feb 2012


    Thank you!

  4. #4
    License owner
    Join Date
    May 2010



    i do something even simpler. your account is most probably bound to and is a add on domain.

    now do that:
    - create a folder for EVERY domain, including, and
    - direct ALL domains to their folder.

    that is public_html is basically empty and has only subdirs.

    now the thing is:
    if you go to a site, you access the subfolder. you CAN NOT (from a browser) go up and enter some others domains dir.

    so, i do not only want to disallow cross-domain-access of a se, i also do not want that a users accesses them this way.

    this is a simple 'protection'.

    also, as a side effect, you can store there things, that can not be accessed via a browser.
    add a dir 'privatestuff' in public_html .. this is not visible via browser.

    another effect is, that your scripts can share functions and data, because they can access any dir that is owned by you.

    what i do is, that i have a dir for almost every domain, and it can e.g. have some index.php or config files or whatever. however most parts are in a shared folder, accessible from any of them. hence i f i need update i update only once and it affects all. (almost, because for third party scripts like av arcarde or wordpress i do it a bit different)

    helpful post? buy me a drink!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts