How do I publish my HTML pages and CSS style sheet?

Hi there. My question is similar to paranoid_androd’s from September but slightly different. I have a hand-coded html website with several images, docs, and a css stylesheet. After looking at some previous discussions in the community, I uploaded all the html files in the folder public_html but my site has not updated. I looked at the site publisher from the cPanel home but it asks me to select a theme. I want to keep my original theme and simply publish the website. What do I need to do to publish my site?

Here is a screenshot of my public folder.

Thank you for your help!

Hi there!

All you have to do is delete the default.html file that was in your account by default (that’s the splash page for all new accounts created) and I would rename home.html to index.html so that it loads automatically without typing that into the browser. Once that’s done clear your browser cache following this guide and you should be good to go! - The Guide to Clear your Browser Cache!

That worked beautifully. Thank you so much Tim!

Hi Tim,

I renamed my home.html file “index.html” and now my website loads without the “/home.html” which is very nice! However, all of my other pages still have the “.html” at the end of the url. Is there a way for me to fix that?

Here is my site if it helps:

1 Like

I found this guide which seems to work Removing file extensions in the htaccess file via cPanel access. I added the .htaccess file to your account with the code specific for html files. Now you can use URLs like and it will work. You’ll need to update your menu and I would recommend you edit the filenames to remove any spaces.

I’ve seen the alternative done which is to create folders for each menu item and then put the page in the folder as index.html. Folder names show up as /foldername/ at the end of a URL so you can get clean URLs that way but I think the .htaccess trick is a bit more elegant. You can just name the files what you want them to show up as in the URL.

1 Like

Great question @cstine. I had thought about this too.

I got stuck in the middle of step 3 of the link you provided.

For the addon domains, I do not get anything in the dropdown menu. If @cstine does not minds, would you post a portion of the htaccess file code.

Here is how my htaccess file looks like:

AuthUserFile “/some/address/here/and/here”
AuthType Basic
AuthName “Home”
require valid-user

This will help others replicate the solution easily. Thanks a ton.

Sure thing, this is the .htaccess code I added to the top of the file:

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.html -f 
RewriteRule ^(.*)$ $1.html

For Addon domains if navigating through the File Manager I would just find the folder associated with that domain (usually either a folder named after the domain in the home directory or in public_html). The popup and options for File Manager has changed a bit from that guide based on the screenshots I’m seeing but it’s just a shortcut to go to the right directory. You can confirm which directory is associated with a domain from the Domains > Addon Domains area.

1 Like