Jump to content

Where Do I Put My Files?


Recommended Posts

A forum reader asked me in email:


Problem: I can't seem to find out how I need to change my paths in the html code.  I believe I need to load everything to public and all pictures and animations to images folder. If that is true I'm not sure how to change the path in my code to reflect the images folder.


Here's what I replied (slightly edited):


The locations of various website files is entirely up to you except the entire site must live under the public_html folder. If you choose to use an images folder then you are free to do so... many web designers do that to keep their sites neat and tidy. Here's a simple example to do it this way:


<TITLE> test page </TITLE>
Here's my picture of my dog Toto.<br>
<img src="/images/toto.gif">


Assume this file above is called index.htm you put it under /public_html when you upload it and you put the toto.gif file under /public_html/images folder. When someone goes to your site they will see the sentence "Here's my picture of my dog Toto." and your little dog Toto's picture. If you wanted to dump all of the files into one folder (I'd recommend against it) you would replace the next-to-last line with:

<img src="toto.gif">


The file path you put after src= would be in relation to the htm file being edited.


I have a church site with many folders - one for ministries, one for images, one for mission trips, etc. In all of my sites I try to remain consistent. I have folders for images, styles which include CSS stylesheets, Templates which are where my Dreamweaver templates are, and major categories if the site is going to be very large.


Hope this helps - if you have any questions just post to the forums in the appropriate category. Family members are standing by to answer your questions. :dance: Seriously, there are a lot of smart folks here and they love to help out!

Edited by Deverill
Link to comment
Share on other sites

  • 2 weeks later...

Hello, I am a new member of the family (as of today). I am attempting to prepare my website so it will be up and running when the transfer of my domain is complete.


I have put my index file in the public_html folder, and my images in the images folder. When I look at the page, the images do not load. I edited the html so that the entire path is shown, starting with "http://", and then the page loads as intended. What am I doing wrong? I don't want to have to edit the path of all my pictures every time I work on my page offline and want to upload it again.


Thanks for any help you can offer!



Link to comment
Share on other sites

Hi Andy,


Thanks, but it doesn't work for me. Whenever I try to just use /images as the address, the pictures do not show up. I have to use the whole path. My images are in the images folder, and my index file is in the public_html folder, so it OUGHT to work, but it simply does not. I had the same problem with my last web host, so it isn't a new problem for me. I just can't see what I'm doing wrong!



Link to comment
Share on other sites


have you tried images/imagename.jpg

as a relative path it will look for the image folder below the current place the site is located.

And if you have an image folder below your site on your computer with the same images, it will also work.



And :dance: Welcome to the family :dance:

Link to comment
Share on other sites

I tried that, Don, and it didn't work. BUT this morning I tried eliminating that first front slash, and lo and behold it now works! So the answer was to not use the front slash before the name of the images folder. At least that seems to be the case. Until the gremlins get in there and mouse me up again, I'm a happy camper! I've come to realize that the more I think I know about computers, the less I really know. Or is it that the computer simply wants to put me in my place?


Thanks to you and to Andy for the replies. I was feeling extremely frustrated, and having people give suggestions was a big help. I wonder why that front slash didn't work for me, when it seems to be the way most people are doing it? As long as I've found a solution, I guess I shouldn't question!


Thanks again to you both!



Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...

Ok so I'm a newbie to TCH but bear with me. I have 2 other sites hosted elsewhere through my ISP and I had no issue whatsoever setting them up and having them work. I've never had a "paid" host before, and some of the gear is strange, but not strange enough to prevent me from seeing what I wanna see. Therein lies the problem. I have a domain and all but it'll take 72 hrs approx. to have it cycle through the world registers, so I'm using the IP for now.


I've uploaded all my files from the sites to this host and placed them in the appropriate folders (or so I believe), but when I goto http://IPaddress/index.html or http://IPaddress/www/index.html all I get is a generic error that says I have no site set up at that address!


What gives?! Mad!!!


All my html files are in the public_html folder, images are in the images folder, but no go. I'm stressed. Am I doing this wrong? Did I miss a step? HELP.

Link to comment
Share on other sites

First :P Welcome to the family :dance:


in your welcome e-mail you should see



Access your Site



To access your site before the domain name completes

propagationyou can go to the URL below to view your site.



Edited by TCH-Don
Link to comment
Share on other sites

  • 5 months later...

Hi, I am new too and getting so frustrated.

I've been trying to set up my index.html page for a couple days now using a double background and placing a welcome banner on my site.

I thought I created a background folder to hold my images but I think I created a background file instead since it showed up looking like a file and not a folder.

Thinking this was a folder, I uploaded my graphics to it, but now that I'm learning a little more about what I'm doing, I think all I did was upload the graphics to my public_html folder since everything was listed below all my folders including that backgrounds file.

In any event, after doing all that but basically doing it wrong, I was able to see my graphics if I used this for the path to my graphics:


Now that I realized I put my graphics in the wrong place, I decided to set up a folder under public_html, called backgrounds and moved all my graphics to it, but now my graphics won't show up.

First of all, just to be sure I set up my folder correctly, let me explain what I did.

I opened my public_html folder and said I wanted to create a new folder.

I named it Backgrounds. When my pictures wouldn't show up, I tried naming it Backgrounds_html. Which is correct?


Once I had my background folder created, I moved all my graphics to it but didn't change the path on my index.html page thinking they should still show up but they didn't.

I then tried to edit the path to just backgrounds/graphic.jpg but that didn't work, so I put my domain name first, then the background folder and still no graphics will show up.

I must be doing something wrong but I don't know what.

I guess I first need to be sure I created my folder correctly.


Link to comment
Share on other sites

Hi Sheryl.

Based upon your explanations, I have a couple of thoughts.


The folder for your images can be called anything, so Backgrounds or Backgrounds_html should work equally well.


I suspect that your trouble is that Linux is case-sensitive. So if your folder is named Backgrounds, the references should be Backgrounds/graphic.jpg rather than backgrounds/graphic.jpg.


Now, again about the reference in the code: using Backgrounds/graphic.jpg produces a relative reference, meaning that the browser will look for the Backgrounds folder in the folder containing the html page itself. To reference the Backgrounds folder from anywhere, and allow portability of your html, you can use /Backgrounds/graphic.jpg, which looks for the Backgrounds folder directly under public_html, no matter where the current page lives.


Hope that helps a bit.

Link to comment
Share on other sites

Thanks for the reply. I never thought about the path being case sensitive. Gosh, there's so many things to think about.

I renamed my folder using lower case letters cause I thought that would be easier in the long run and now if I go to my page my backgrounds are showing up. However, if I click show file under File Manager the backgrounds aren't there.

They showed up before I moved those background tiles.

I haven't moved my Welcome sign and that still shows up so I don't understand why the background tiles don't show up, now that I corrected my folder name.


I have another problem. I uploaded a zip file to a new folder called zip under public_html and tried to put a link to this file on my index page but the link doesn't work.

This is how I tried to link it.....


<a href="http://www.domainname.com/zip/zipfile.zip/"> here</a> to save the zip file to your computer.


Is that the correct way to link a file? If so, should it work or does the server not allowing us to link zip files?


Link to comment
Share on other sites

Sheryl, I would recommend using an FTP program to manage your files

as file manager is not the easiest way.


With an ftp program you will will have two windows side by side

one showing a folder on your computer and the other showing a folder on your site.

You can select and drag from computer to site, or from site to computer.

Some will even let you view the file on your site.

You can select a site folder or file and right click to rename, delete or change its attributes (read, write.....) called permissions.

I use CoreFTP Lite

and am very happy with it.

Link to comment
Share on other sites

Thanks for the suggestion Don and thanks for telling me I needed to get rid of that

"/". I did that and now I get the option to save my zip file.

I didn't realize linking to a file and linking to another site would be different since I also decided to try linking to another web address and that worked using the "/" at the end of the web address.

Another problem solved.


Link to comment
Share on other sites

  • 2 months later...



I have a question. I uploaded an index.html to my public_html folder, but when I go to my website, that html doesn't automatically come up. It still goes to the page that says "Index of/" and then lists the folders/files. How do I make it so that when I go to my website, www.mywebsitename.com, the index.html file comes up?





Link to comment
Share on other sites

Hello again,


Thank you very much for the kind welcome and fast response. The tech support on this site is the best I've seen anywhere.


You were right, I had Index.html capitalized. I changed that and it fixed the problem. Thank you again! I'm glad to be part of the family. :)



Link to comment
Share on other sites

  • 3 weeks later...



I'm having the same problem as Valerie....Except my index.html is already lowercase but when I go to www.**** all that shows is the HTML code?


I uploaded it under public_html



I'm sure I'll get the hang of this someday but for the time being it's making my brain hurt ;)




Link to comment
Share on other sites

  • 1 year later...

I have uploaded everything with my FTP ..... but I can't see anything no matter which route I take...I either get the page can not be displayed .... or the other route .... Index of ...


So I am wondering if I put my index files in the wrong place (my index files contain everything I need for my main pages) .....I saved my html as index.html links.html etc.......all those pages I uploaded separately and then I uploaded the full index folder with all the files in it .........now I didn't put that into another folder....should I have?????

Link to comment
Share on other sites

Okies...never mind that problem....I moved every folder and all my html pages to the public.html folder......I can see something ... not one image .. just black and grey.....sooooooooooo .... do I have to change all my html to view the images? right now I have background="indexfiles/indexheader1.jpg"


so now I am not really sure what I have done wrong...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...