When you are ready to upload your website, in order for it to display on the Internet the files must be placed in the correct folder. By default, your primary domain document root is public_html. You can change the Directory Index of your site by modifying the .htaccess file.

What is the Document Root?

Your Main Domain

All domain names in your account have a document root. The document root is the folder that stores the files for your website. The document root for your main domain name is the public_html folder.  When you are ready to upload your website, the files will go into the public_html folder.  Once you have uploaded an index page, it will over-ride the default "Hello There!" page that accounts show upon sign-up. 

Addon and Sub Domains

When you add additional domains to your account, it will create a folder in your public_html folder for that domain.  With a subdomain the folder will be called the same name as the subdomain, for example public_html/subdomain.  For an Addon Domain, by default it will create a folder in your public_html folder with the same name as the Addon Domain.  If you would like you can change the document root for your Addon Domain when it is created to a different folder.

What is a Directory Index?

The directory index is the first file the server loads and by default will be the index file within the document root of the domain (the public_html folder if it is your primary domain).  Our servers always load the file called "index" if your domain is typed into the browser, first looking for index.htm, then index.html, and finally index.php. When your account is first created, we also place the default.htm file (the default "Hello There!" page) in your account that will load if no index files are found. If there is no index or default file in your folder, then the website will not load unless the directory index is modified.

Changing the directory index

Some website design applications will name the home page something other than index. For example, the application may name your homepage Welcome.html or Home.html. If your application does this, you will need to modify your site so that the directory index matches the name of your website's first page. You can do this using a .htaccess file.

In the following example we will assume you want your domain to point to Welcome.html when it is visited in a browser. We need to update the .htaccess file so that the server will load Welcome.html first.  Open (or create) the .htaccess file in your domain's document root and add the following line: DirectoryIndex Welcome.html.  Once that is added, when your domain is visited that page will be loaded first.  Please note that our servers are case sensitive when adding the new directory index.

Directory Structure

When uploading files with either an FTP program or a site design program such as Dreamweaver, it is important to keep in mind that any folders you upload to your account will become additional folders in your directory structure. For instance, if you're uploading site files for your main domain name and you are uploading a folder named images, then the path would be public_html/images/ when viewing the folders/files in either FTP or cPanel File Manager. If you want to access that folder from your website, the path would be yourdomainame.com/images. 

If you ever see any broken links or images on your site, one of the first things you'll want to check is where the link or image is pointed to. You can hover over a link with your mouse to see the path it is pointed to. To find out where an image is pointed to right click the broken image and select either View Image Info, Properties, Copy image url or something similar (depending on your browser and version). Once you have the path, double check that the document or image is in the folder your link or image is pointed to.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?

Comments

2012-09-01 4:20 pm
What about my temporary URL?
Staff
14,507 Points
2012-09-04 11:21 am
Hello clives5,

The temp URL and the domain name are pointing to the same place, which is the public_html folder. You would use the same rules above for both the Temp URL and the regular domain names.

Best Regards,
Scott M
n/a Points
2014-05-05 8:18 am

I recently upload my web site to the host server using FTP.  They were originally located in a subfolder for the FTP account name within my public_html.  Using File manager, I moved all of the files from the subfolder to the root public_html folder.  I went to my temp url to view/test the web site and the only page I get is the default My Blog page. I have both a Index.htm and index.php files in that directory. I don’t understand why the site will not display correctly from the host but did work correctly before I upload?

Staff
10,602 Points
2014-05-05 11:25 am
Hello HerbG,

Thank you for your question. Have you tried clearing your browser cache after moving the files?

We are happy to help, but will need more information to assist you, such as a link to the website, or the domain name.

Are you using a CMS such as Wordpress, Joomla, or Drupal, etc?

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul
n/a Points
2014-05-05 1:59 pm

I have cleared cache.  The site is baysidehog.  I am only attempting to view the site at this time.  WP is installed, but I've made no attempt to use it at this time.

Staff
14,507 Points
2014-05-05 3:25 pm
Hello HerbG,

The biggest issue is that the Index.htm page is capitalized. On Linux servers capitalization is specific, so Index.htm and index.htm are two separate files. Linux looks for index files in the following order: index.htm, index.html, index.php. Capitalized filenames are not looked for at all.

I tried hard setting the Index to the site in the .htaccess file to Index.htm, however the other rewrites you have in there do not allow it to work.

The best thing to do is to rename the Index.htm file to index.htm, but you will need to go through all other files and make sure you change all references to that file index.htm.

Kindest Regards,
Scott M
n/a Points
2014-06-02 8:38 am

My site is rather raw, but I need people to see it as it is a project where many people are involved. How do I make the site 'visible' on Internet? All those domain, folders and subfolders have made my head spinning. I need a step by step guide for a newbie! Ta.

 

I presume that I can change the theme and any of the setting of the web-site later on?

Staff
10,602 Points
2014-06-02 9:28 am
Hello Katya,

Thank you for your question. If you are using FTP to publish your main website, you will want to upload to your: public_html folder.

In cPanel, there is a button for Softaculous (in the Software/Services section), which helps you install software with 1 easy click.

While there are many programs available there, the most popular for building a website are: WordPress, and Concrete5

When you install a program from Softaculous, you can choose a folder location as part of the setup, and you will be given a link to the program when the install is finished.

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul
n/a Points
2014-09-04 12:24 pm

You documentation should have many useful examples to support the contexts described.

Staff
14,688 Points
2014-09-04 1:28 pm
Hello Francis,

Thanks for the comment. We always welcome comments on improving the documentation. This will be taken into the account as the articles are updated. If you require examples, each definition actually describes each item. For example:

Root Directory - by default it is PUBLIC_HTML. If you use the cpanel file manager, you can see the directory structure of your files. The folder called "public_html" is always part of the files when you first get your account. In terms of the Directory Index, this is the file that is FIRST loaded by the web server. It can be designated, but by default, it is the index.htm, index.html, or index.php file within your public_html folder.

If you want to see the Directory Index changed, check out this customer question and answer. It demonstrates how the file can be changed using the command directoryindex in the .htaccess file.

Hope that helps to illustrate the definitions. We will update article to better show these examples in the near future.

Regards,
Arnel C.
n/a Points
2015-05-27 5:44 am
Hi there! Thanks for this blog. Just want to hear your insight! If I am using wordpress as CMS. where should I upload it directly to "public_html" or create a dir like "public_html/dir".. I am planning also to add domain in same account. What is the best choice for me? thanks
Staff
14,688 Points
2015-05-27 8:49 am
Hello Ralf,

The PUBLIC_HTML folder is the folder that belongs to the primary domain associated to the accounted. So, if your domain was example.com, then the files for example.com would be placed in public_html. If you created a sub-folder under the PUBLIC_HTML folder, then the path of the site would be based on that folder's name. For example, if you created a subfolder named "FOLDER", then the path would be PRIMARYDOMAIN.COM/FOLDER (where "primarydomain.com" is the name of your primary domain).

Add-on domains create folders under the PUBLIC_HTML folder, but are considered as separate websites by the DNS setup for the account. So, if you created an ADD-ON domain named ANOTHER_DOMAIN.COM, then you would see a subdirectory under the root folder (PUBLIC_HTML) called "ANOTHER_DOMAIN.COM". The folder could also be named something else an assigned to the add-on domain.

To answer your question, download your files into the PUBLIC_HTML folder for the primary domain, but make sure that you distinguish a folder name for the add-on domain so that you can easily find it when you add the add-on domain. Here's an example:

public_html
folder1
folder2
file1
file2
ADD-ON-DOMAIN
folder1
folder2

You can easily see that the "ADD-ON-DOMAIN" folder is easy to make out. It doesn't have to be that name, but just something that you will remember as the location for the files of your add-on domain.

I hope this helps to answer your question, please let us know if you require any further assistance.

Regards,
Arnel C.
n/a Points
2015-07-20 5:52 pm

how to create another folder to upload my videos in wp-content wordpress and how i can protect it from non subscriber

Staff
14,507 Points
2015-07-20 6:33 pm
Hello Amro,

You can create a folder by using the File Manager in cPanel. To handle it as member only content, you will need a membership plugin for WordPress.

Kindest Regards,
Scott M
n/a Points
2015-07-24 5:43 am

please why is my site showing like this after uploading to cpanel. but i also uploaded thesame site to godaddy it showed correctly. or am i missing somthing very vital here. www.thepizzaplace.com.ng 

 

Staff
14,688 Points
2015-07-24 9:27 am
Hello Charles,

You either have an index file that is loading for your site, or you have a plugin that is showing the maintenance page. You have to disable the plugin or remove the file in order to see the actual theme that you loaded.

If you have any further questions or comments, please let us know.

Regards,
Arnel C.
n/a Points
2015-07-25 11:34 am

I have a basic index.html file that I uploaded to my site's file structure, and is now in the root directory and the public_html folder.  I uploaded the style.css and a background image, which are both in the same folders with the index.html file.  I'm certain that the code is correct, and since the index.html file points to the css file which points to the background image file, the background image would display when I go to the home page in the browser.  But it doesn't display.  A link I placed in a <p> tag in index.html displays, but not the background image I wrote the code for.  I tried placing the style.css and background image files into their own respective folders within the root directory and public_html folders, but that didn't work either.  Is there something I'm missing and/or doing wrong?

Staff
10,602 Points
2015-07-27 10:17 am
Hello Preston,

Thank you for contacting us. We are happy to help, but will need some additional information.

Please provide an example of the code you using to call in the background image?

Can you provide a link to the site you are working on?

Thank you,
John-Paul

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.