how do I remove the index.html behind the domain name?

Recommended Posts

Let's say the domain in question is example.com.

As Brian said, you need to have an index page such as index.html (you can have other suffixes, as appropriate - .shtml, .php, etc.).
This should go in your public_html directory.

Then if a visitor simply goes to http://example.com, he will see that address in his browser,
while what is displayed is the contents of index.html.  You don't have to do anything to remove it.

A visitor can also explicitly open http://example.com/index.html
in which case that full address will appear in the browser address bar.

If you want to make that appear as just http://example.com as well,
you can, since the main page for HawkHost's website does exactly that. 

If you try to open https://hawkhost.com/index.php what you see
is just https://hawkhost.com (Index.html gives a 404 error in that instance.)

For some htaccess code to accomplish that, see this post:
(among many others of simiar bent)

NOTE: adding rewrite rules is tricky business, and can easily mess things up.
Experiment in a subdirectory before adding it to your main home directory.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now