sitename.com/index.php opens when openin website

**Silverstripe Version: 4

Question:

When I go to my website’s domain name the for the first time after clearing the cache it loads the “index.php” directory. I assume that it has to do with the way the hosting reads into my files. Niow the question is what do I have to do to set my base URL to just “sitename. com”?

Can you confirm what hosting platform you are using?
Have you got the hosting configured to use the public directory of your installation as the document root?
Do you have all the relevant configuration files (webconfig or htaccess, depending on the hosting) in the right place?