Heloo Guyz!! I Uploaded My Html and Php Files To server by using FileZila. And When I google and click my address It shows all the Files i uploaded to server(Shows the directory ). not the home page, how can i show my home page only when i click my address please help me?????????

Dani AI

Generated

Good catch by and the explanation from — that combination fixes the vast majority of "shows directory" cases. For readers arriving later, here are compact, practical checks and fallbacks that go a bit beyond the original replies.

First, quick checklist to isolate the problem: make sure your homepage file is actually in the public document root (public_html, www, htdocs, etc.) and named exactly the way the server expects (case matters on Linux). Try loading it directly (for example, domain.com/index.php) to see whether the file itself is reachable. If the file exists but doesn’t execute (you see source or a download), PHP may not be enabled. Confirm file permissions (typical values: directories 755, files 644). If both index.html and index.php are present, the server may prefer one; remove or rename the one you don’t want.

If the .htaccess approach doesn’t take effect, check these common causes: you might be on Nginx or IIS (those ignore .htaccess), the host may have disabled per-directory overrides (AllowOverride None), or the file was uploaded incorrectly. Nginx requires changes to the server block (index/try_files), and IIS uses web.config or the hosting control panel to set the default document — contact your host if you’re unsure which webserver you’re on. Note: misconfigured .htaccess can cause a 500 error, so keep a backup before editing.

FileZilla tip: dotfiles (files starting with a dot) are hidden by default; use the client option to show hidden files or upload the file via your host’s file manager. If you cannot use server-side directives, a simple client-side fallback is to place a tiny index.html that redirects to your PHP page, for example:

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="refresh" content="0;url=/index.php">
  <title>Redirect</title>
</head>
<body>
  Redirecting... <a href="/index.php">click here</a>.
</body>
</html>

Final tips: check your server error logs when things fail, clear any CDN/browser cache, and if unsure about hosting settings ask support to confirm the document root and default-document order.

Recommended Answers

All 5 Replies

The web site configuration is going to have something related to "default files" (depends on the web server and the admin tool you are using). In any case, the point is that when you type in your URL such as domain.com, the web server needs to know which file to serve since you did not specify one such as domain.com/index.php. So you need to configure your site and tell it which default file to load when no file is explicitly requested.

The reason why you see a listing of your directory is because you most likey have "directory browsing" enabled. You may want to disable that feature. In the event that its disabled, the web server will then just return a 404 (page not found) error instead of sending back the directory listing.

Thank you!! How can I make it Correct???

Log into your hosting account panel (please excuse the general terms as it depends on what you are using to manage your web hosting account) and look for two items...

Something related to "documents" or "default pages", etc... Then, make sure in that list of documents, you have in order the names of the files that you want the web server to load. For example, if your home page is default.php, and you plan on having this file name say in every folder, then make sure that you have default.php listed as the first item. Or, you can add default.htm, default.html, index.htm, etc... The list depends on you.

Secondly, look for directory browsing... disable that feature.

If you run into issues, these two items could be quickly addressed by contacting your hosting provider's support.

Member Avatar for Member #671080

As JorgeM said, but some hosts don't have specific settings to change. You can add a file called .htaccess that contains the following:

# Defauly homepage order.
DirectoryIndex index.php index.html

# Prevent directory listing.
Options All -Indexes

This first part of this file will try to load index.php by default, if it doesn't find that it will try to load index.html. You can add to (or change) this order if you like.
The second part restricts directory listing.

The .htaccess file can be a little tricky to create as it doesn't have a name, just an extension. A quick search should get you more details on what .htaccess can do.

Awesome Mr: Zagga It Really Worked Thanks Once Again!!!! :)
And Mr:JorgeM Thaks For Helping Really Apperciate It

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.