Have Domain Open HTML File? - html

I am currently making a website, and have a folder containing CSS3 and HTML5 code in it. When I click on the index.html file, it opens up a local file and I can see my design and text in it. However, I am not sure how to have my website "point" to the index.html file, so it shows the content that is in the file. (I bought the domain with GoDaddy).
Thanks for the help!

Make Sure the directory does not have any other default files like default.php,default,html,etc and also there should be only one index file. if there is any index.php it will overtake index.html. Please make your question more clear and tell use which hosting are you using.....

Check documentation of the company that provides you hosting - the server has a list of files it looks for on disk in a given order. Only thing you need to do is to rename you file to match server's "lookup table".
Relevant part of configuration of the most popular web servers:
apache: https://httpd.apache.org/docs/current/mod/mod_dir.html
nginx: http://nginx.org/en/docs/http/ngx_http_index_module.html

Related

Why do people name their files index.html?

I have seen a lot of people been using that file name for their HTML files. I wonder why? I'm kind of new to HTML, I haven't learned much, but when I name my HTML files, I name them whatever I want. When I have been searching up examples of HTML, I have found they name it index.html. Why?
I have seen a lot of people been using that file name for their HTML files
You would typically use that name for one of your page, and it would usually be the home page.
When you arrive a website, for example www.website.com, you're not pointing to a file (like you would be if you typed www.website.com/about.html), you're pointing to a directory listing of all the files.
The webserver will try to serve a file, typically called index.html or index.php by default, but it could be something different, and it's configurable by editing your webserver's config files.
If the server doesn't find any file to serve (because you didn't include an index.html file or because you renamed it without editing the server's config) you will see a listing of the files, which is rarely the desired behavior, especially at the root of a website.
Generally the contents of index.html will be returned when just the directory is requested.
e.g. http://example.com/index.html is returned for a request for http://example.com
This is merely convention and is usually configurable.
Here is my take: It was likely named 'index' in the original internet because it is the 'indexing page' that directs to the sub pages, and you would go back to the index page to go to another page. This was before images and search engines. Later it got more advanced with a menu on all pages. This is how I remember it, but it's a long time ago.
https://twitter.com/PresidentUSW1/status/1442236777293496325?s=20
The default landing page of many Web servers defaults to index.html or default.htm and either way it's simply a start page. It's not necessary at all.

Web site title showing index of

Google search jobbulls website title showing index/
I have uploaded all of my files for my website. When I type in my domain name, I see a page titled "Index of /" that lists each of the files used to create my website. Can anyone tell me how to fix this?
Your first page should be called index.html
In fact, it can be called a lot of names, this is the priority that will decide the one to display: (higher first)
index.html
index.shtml
index.php
index.htm
default.html
Default.htm
default.html
Default.html
default.shtml
Default.shtml
page1.html
index.pl
index.cgi
index.php3
index.phtml
home.htm
home.html
home.shtml
index.wml
based on the DirectoryIndex by Apache.
Now as a second answer, if you uploaded the files and these contain a file listed above and it still doesn't work, then make sure you uploaded the files in the correct directory. Sometimes ftp brings you one level higher than what is called the 'webroot' check to see if there is no 'public_html' or 'www' or 'html_docs'.
In that case, make sure your files are uploaded in this folders.
It maybe the uploading folder problem.
First of all you can try these 3 methods,
Option 1 – Upload Your Website via xxxx's File Manager
Option 2 – Uploading Your Website via FTP such as FileZilla
Option 3 – Uploading Your Website via cPanel’s File Manager
Select the option and start to upload.
Open the server folder and you may can see some folders like .htaccess, public_html.. Please open the folder public_html and upload into it.
If you still see the problem, reupload the files again.
Thank you.
You need an index or a page for the web server to serve up as the page for the site.
To get started you could upload an "index.html" page and most web servers will serve this as their first page by default.
Upload this line to your .htaccess file and see what happens
DirectoryIndex index.html index.php
If that doesn't work, can you post the contents of your .htaccess file?
This should work for a site coded with php.
Best solution for this you have to set Options -Indexes in .htacess file.
I had the same problem. This was because I used an capital 'I' as first i of index.html. This did not work because 'Index.html' was not in my directory listings. The standard solution for this would be changing Index.html to index.html. (note the capital 'I' and the lowwer case 'i')
ok first of you have to upload zip file while so It will not give to error while uploading.
put your folder in public_html section extract it.
main page of your file which have to call by default by entering your site name
is index.html don't give name Index.html system has access for index.html

Opening directories in HTML

In some websites, I see links that look like this:
Link
The link doesn't go to an html file, but a folder (I believe). I was wondering if this has any purpose, and how to do this. Is there a default file to open when opening a directory? Because when I try something like this, I click the link, then I see a list of files in that folder, and I have to click on the proper link.
Everywhere I look, it says you should do links like this:
Link
Should I just let it go? I'm awfully curious.
This is something that is controlled by the web server. Some will look for a file called default.htm, others will look for index.html. It's usually configurable, and sometimes the server may look for any of a number of variations of index or default.
If such a file is not found, the server will often display a directory listing of all the files found in that folder, but usually that's not a good idea for security reasons. Again, this is something that can be controlled in the settings for the server.
Allowing directory listing is VERY dangerous and ill-advised practice. You should hide real directory structure of your site by all means.
PHPDL is a Php script that lists all the files in a directory (except itself of course). What sets PHPDL apart is that everything the script needs is in one file, including the file-type icons it uses.
Note: You can rename the script to anything you want. It will not list itself as a file to download.
This script safe and usefull, see demos:
http://greg-j.com/projects/phpdl/PHPDL-v2.php
http://greg-j.com/projects/phpdl/PHPDL-lite.php

Setting the .htaccess MIME type to text/cache-manifest in XAMPP to view websites offline in HTML5

I've seen pretty much all the tutorials in the web about how to make your site viewable offline using the cache manifest and they all say something like this:
A manifest file must be served with the mime-type text/cache-manifest.
You may need to add a custom file type to your web server or .htaccess
configuration.
But when I look at my XAMPP directory, there aren't any files named ".htaccess" in my xampp/htdocs folder. I did a search under the xampp/ directory and there's quite a lot of them, one in each folder below:
xampp/htdocs/drupal
xampp/phpMyAdmin/setup/lib
xampp/phpMyAdmin/libraries
xampp/htdocs/xampp/sqlite
xampp/htdocs/forbidden
xampp/phpMyAdmin/contrib
My partner here says I have to make that myself inside xampp/htdocs/nameOfTheFolderOfMyWebApp but I don't quite trust him since it didn't work. Help?
This may help, at least for testing:
Since you are using PHP, you could create a PHP file named themanifestfile.php with this content:
<?php header('Content-type: text/cache-manifest'); ?>CACHE MANIFEST
demoimages/clownfish.jpg
demoimages/clownfishsmall.jpg
demoimages/flowingrock.jpg
# THE REST OF YOUR OFFLINE FILES GO HERE
Then, in your html:
<html manifest="themanifestfile.php">
I know this doesn't directly answer your question, but it may save you a lot of time fighting against apache configuration files if you only need to test your app.

You don't have permission to access /betaSite/ on this server

I'm having a big problem. I just revamped this apt. companies website and created the new website in a folder contained in the current website. I just finished and have put all of the old site files into and oldSite folder and brought all the new files out of the betaSite folder and into the public folder. I've tried changing the file persmissions but idk if they are sticking. Please help! I really have no clue how to fix this. Thanks!
asirentals.com
asirentals.com/index.shtml
From here: http://www.thesitewizard.com/apache/install-apache-2-windows.shtml
If you want "index.shtml" to be your default start page for your directories, ie, if you want Apache to load "index.shtml" when you type "localhost" or "localhost/directory/", you will need to search for a line in your "httpd.conf" that begins with "DirectoryIndex" and add index.shtml to the list of files there. For example, modify it as follows:
DirectoryIndex index.shtml index.html