Can i host images in my sub-domain? will this cause any problem ?

Discussion in 'Site & Server Administration' started by vaakash, Apr 23, 2010.

  1. #1
    Can i host images in my sub-domain? will this cause any problem ?

    I heard that this will increase my sites speed ! Is this true. Will this cause any problem to Google, bandwidth or anything ???

    Please help !
     
    vaakash, Apr 23, 2010 IP
  2. RonBrown

    RonBrown Well-Known Member

    Messages:
    934
    Likes Received:
    55
    Best Answers:
    4
    Trophy Points:
    105
    #2
    I can't see how it would increase the speed of a site unless the images were hosted on a completely different server so the site was downloaded from one server and the images from another. However, even that would be doubtful as it would need to be downloading some of your site BEFORE it started to get the links to the external images AND because the "src" to the image will be slightly longers. It won't increase bandwidth in any measureable way because the site files and images are a certain size irresepective of where they are downloaded from.

    So, to answer your question. Yes, you can host images on your subdomain if you want. No, it won't make it any faster and no it won't make any difference to bandwidth. It will make coding the site slightly more complex as you need to hard code the image location (http://subdomain.domain.com/image/image1.jpg) rather than relative links (images/image1.jpg), and it may be slightly slower...or faster.. but not noticably.
     
    RonBrown, Apr 23, 2010 IP
  3. David L

    David L Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, you can definitely host images on your sub-domain. As far as I know, this won't increase the speed of your site neither it will affect your site rankings on Google unless and until you have some illegal content on the pages.
     
    David L, Apr 23, 2010 IP
  4. vaakash

    vaakash Member

    Messages:
    127
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    35
    #4
    I just got this idea of hosting my images in a sub domain after seeing this page
    http://www.askapache.com/htaccess/apache-speed-subdomains.html

    In my site, i have a huge amount of resources, eg: forum in a folder. Since i am hosting forum in a folder, i am worrying about my sites speed. Then i decided to host the img in a sub-domain

    Thats it !!
     
    vaakash, Apr 23, 2010 IP
  5. RonBrown

    RonBrown Well-Known Member

    Messages:
    934
    Likes Received:
    55
    Best Answers:
    4
    Trophy Points:
    105
    #5
    The article seems to be an opinion, not a fact. While it may sound attractive I doubt there is any real benefit because the subdomains are on the same server as the existing web site, so it's not as if they are really getting the perceived benefits of 3 separate servers - what they have is 3 separate domains on the same server and it is the same piece of hardware that is dealing with the connections. Also, since they are using 3 separate domains this uses up more resources as the CPU is dealing with traffic from 3 separate domains rather than a single domain.

    They also haven't taking into account that the the ability to download a particular file e.g. an image, is dependant upon parts of a file from a different subdomain being downloaded first. This is further complicated by the fact that pages are sent out as packets that can take multiple routes and arrive at the client in a random order. The client has to rebuild the packets into a viewable page, and due to the random nature, most of the HTML page would need to be downloaded first BEFORE any other elements and their addresses were available such as images, flash scripts etc etc. The idea sounds attractive but I don't think it will really work and I wouldn't be convinced until I saw some comparison figures where the difference was measured and all extraneous influencing factors were neutralized.
     
    RonBrown, Apr 24, 2010 IP
  6. vaakash

    vaakash Member

    Messages:
    127
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    35
    #6
    Also, you can note that many famous websites use sub-domains to host their images and files in sub-domains.
     
    vaakash, Apr 26, 2010 IP
  7. RonBrown

    RonBrown Well-Known Member

    Messages:
    934
    Likes Received:
    55
    Best Answers:
    4
    Trophy Points:
    105
    #7
    So what? You asked our opinions and we gave them with reasons why we didn't think it would make any difference. Your above statement adds nothing to this.

    Do you know why they host them on subdomains? Is is performance related? Is it due to clustering? Is it to separate items onto other servers for easier management of the contents or user contribution? Making a statement without providing reasons for them doing that are not proof one way or the other. You're obviously convinced that placing your images onto a subdomain will help your site perform better so why not go ahead an do it? You're obviously not interested in what anyone says or what proof they bring to the table that says it's unlikely to make any difference, so why bother asking if your not going to be convinced otherwise?

    These large sites may place them on subdomains for performance reasons, but that's probably got more to do with running them on separate servers. In the case of these large sites each server (or cluster) is problably operating near their limits so it makes sense to hive-off parts of their operation to other servers - just like people separate Web Site and Database operations onto different servers after a while. But, this isn't what YOU are doing. You're going to be using the same physical server and it has a maximum performance limit and for all the reasons previously stated it will make so little difference that you won't notice it (faster or slower). Many large sites operate over several servers or clusters of servers and that's a completely different scenario.
     
    Last edited: Apr 26, 2010
    RonBrown, Apr 26, 2010 IP