What files do you need for a website?

Status
Not open for further replies.

wafflehammer

Fully Optimized
Messages
2,502
Location
Logan, WV
Uhm k. Finally got my web hosting issue sorted out and I found myself in need of more help.

This FTP thing is totally new to me and I seem to grasp the concept of just uploading from there basically.

The thing that gets me is...is what files do I actually need for a website to be "whole" and "complete"?

When I first got on it I was going through and removing all the stuff they already put on it (parked domain basically just to advertise for them :| )I noticed there was different files like "img" or "images" for all the images , etc.

So is that what you should do? Keep separate folders for the html and images? What about the css and php stuff...where does that go?

Also how do I make stuff actually appear as the website? I uploaded a file with some basic html just to give it a try..and instead of appearing on the website it's under an index and I have to click the file..then it brings up the webpage. Is this where the php comes in(kmote mentioned it's the language that basically communicates with the server)?
 
Let's start with the basics.

FTP clients are pretty easy to use. Typically the left side of the program represents your local computer, and the right side represents the server.

Let's say you want to upload a file called "smile.jpg". You would navigate to the file on your computer on the left side, then navigate to where you want it to go on the server on the right side, then upload it (either by right clicking -> upload, or usually double clicking works, depending on what client you're using). FileZilla is a super easy FTP client to use, I highly recommend it.


K, let's say you're at the root of your website directory on your server, where they had the parked domain thing most likely. The first thing to do is create "index.html" and upload it to the root. When you go to your website url, that html file will appear - so just write anything in the html file to see if it works. It should also show up at yourwebsite.com/index.html.

If you want a second page, maybe called "hello.html", upload that as well. You should be able to see it at yourwebsite.com/hello.html.

However, you'll want some organization once you get more files. This is what directories (folders) are used for. Create a new directory in the same root directory as your index.html. Call it "images".
Then you can enter the folder, and there should be nothing in there. Upload an image, for example "smile.png". You can then see this image at yourwebsite.com/images/smile.png.

What if you want that image to appear on your home page? It's still good to keep images in other directories (feel free to make more than one if you have a lot of images - just stay organized). In your index.html file, you would include code to display the image, who's source is now images\smile.png". It would still be accessible by going to the yourwebsite.com/images/smile.png url, but it would also show on your index page from the code you wrote.

(go to w3schools.com to learn the code for an image in html)

Hope that helps. Keep asking questions. Messing with the code in your index.html, reuploading it, and refreshing the page in your browser is a great way to see what changes your code is making.
 
yea I'm sure filezilla as of now.

I uploaded a file (homepage.html) so I go to my website and it says /index of or something like that then lists all the files (well..file since homepage.html is the only one) then when I click on it the page is displayed (text, colors, etc)

So I have those files listed on the index...but how do I make it so there is no index..and it goes straight to a "homepage" ? Is there where it gets more complicated and you need to know more than just basic html?
 
No, html is all you need for now. We'll add in css later, but don't even think about php for now.

index is a default recognized file name, whether it be index.html, index.php, etc. For now you'll just be using html.

If you simply change the name of your homepage.html to index.html, it will show the actual page instead of the file list you're getting.
There are ways to redirect straight to homepage.html, but index.html is a web standard and you should rename your homepage to index.html.

Try renaming it and let me know if you get the result you're looking for.
 
ahhhh okay yea that worked like a charm :D thanks a bunch

so basically you just upload whatever into there..then that allows you to link everything to it (other links on the page, pictures, etc)

starting to understand this a bit ..thanks for the help
 
Yep, from there you can upload other html pages that will be located at yourwebsite.com/asdf.html.
You can put links in your index.html to go to those other pages rather than typing in the full url's.

Theoretically, you don't need links on pages for anything. If the file is uploaded on the server, and you know what the directory/file name is, u can type in the full url to get to any page you want - but links are there to obviously make it an easier experience for the users.

I'll be here if you have more questions - the class im in right now is super boring... thankfully i have tech forums to keep me busy. :)
 
Do like what he said and mess around with the HTML. You can get started here HTML Tutorial. Also you can download a web editor or use any installed on your system such as "Microsoft Frontpage" - installed if you have MS Office 03 or under (this would help you get an idea of how your website is going to look and gives you a more WYSIWYG approach). But in any case, it's better to understand the HTML rather than jumping to software, as it gives you the basic understanding of how a website works.

Websites can be created by the use of notepad :p, that's how easy it's going to become for you :).
 
^^^ yea my hosting cpanel has stuff for like drag n drop editing...templates.. blah blah but I wanna just do all the html from scratch to learn more
 
^^^ yea my hosting cpanel has stuff for like drag n drop editing...templates.. blah blah but I wanna just do all the html from scratch to learn more
That's great :), HTML is easy to learn so you got no problems there. Just code and test, see what it does or how it looks, then repeat/change what you wish and you would get the hang of it pretty fast :D.
 
You can also set configuration options from your CPanel to let homepage.html be the default page. It's just index.html because that's the most common. You can also turn off directory browsing so that if a default file is not specified, then people can't see an index of your files. It's just a little more secure.

It is a good idea to keep things organized in directories. Images, CSS, Javascript, etc all in their own folder. This will help keep maintenance down and will make it easier on you in the long run.
 
Status
Not open for further replies.
Back
Top Bottom