I made a bucket lets call it my bucket. I gave "Legacy Storage Read" to this bucket and it means that it should not list the buckets but if someone knows the URL of specific files or folders inside the buckets they could visit it.
If I enter the only bucket address in URL I get access denied even though, I added index.html ( which is in the root of the bucket) as the main page in the bucket website configuration. Anyone has any idea why the bucket does not routed to index.html if I just go to the bucket URL?
Have you configured your permision? If this is not the case you can try below steps.
For full details you can refer to this link
In the Google Cloud Console, go to the Cloud Storage Browser page. Go to Browser
Click the Bucket overflow menu () associated with the bucket to which you want to grant a member a role.
Choose Edit bucket permissions.
Click the + Add Members/Principal button.
In the New members field, enter one or more identities that need access to your bucket. If you want to serve your bucket to the public, then type
allUsers
Select a role and grant
Storage Legacy Object Reader
(or roles) from the Select a role drop-down menu. You can check at (Legacy Role Permision reference).Click Save.
Also, below steps is to route your bucket to desired html file.
For full details you can refer to this link Static website examples and tips
In the Google Cloud Console, go to the Cloud Storage Browser page. Go to Browser
In the list of buckets, find the bucket you created.
Click the Bucket overflow menu () associated with the bucket and select Edit website configuration.
In the website configuration dialog, specify the main page and error page.
Click Save.
To learn how to get detailed error information about failed operations in the Cloud Storage browser, see Troubleshooting.