Is it possible to see any website's directory?

…that is, the ones without passwords??

how do you see the directory? I tried searching for the answer, so now I am begging you to tell me the answer

No. It just depends on the settings of the server you’ve connected to.

is there a basic command that might show me the directories more often then not (or at least more often)

Not that I’m aware of. Your best bet is just to delete everything in the URL after the last / and then keep removing them one layer at a time back to the next /

As Sage Rat said, the “command” to list the directory is simply to provide a url which is a folder name without a page name. Per the standard, the server is then obligated to return the driectory listing, or else say that it’s configured to proibit that.

For example, this thread’s url is

The folder url is
http://boards.straightdope.com/sdmb/
and the page’s url within the folder is
showthread.php

So you can try to sumbit that folder url & see what you get. In almost all cases it won’t be anything but the brush-off message.
10-15 years ago most websites were collections of static files & the web server mostly just copied those files over the wire to you. In that environment, the idea of a folder directory makes some sense, and if you took a directory listing you could then look at each page/file.

Nowadays, most web “pages” are actually programs which are executed by the server to generate the result you see. In the case of the SDMB link above, there is a program called “showthread.php” which knows how to do look in a database, retrieve the posts, and convert all that into the html to send to the browser.

So IF the board allowed you to list that directory (which I bet they don’t), all you’d see is a list of a couple dozen programs, not a list of all the threads.

This is why well-designed sites have comprehensive links and often have sitemaps which serve like organized directory listings.

But there’s no requirement to follow the standard, either. It’s really more of a convention. On my web site, if a directory contains a file named index with an extension of html, htm, or php, and a user types in a URL just with the directory name, the server will serve the index page.

Here’s an example of the old-style webserver generated list of files in a directory:
http://ibiblio.org/pub/

Basically, Apache gets the list of files in a directory and pretties them up for you, including linking to subdirectories. It’s a handy feature, but a major security flaw, so any server admin worth their salt will disable it. Except in cases like this public directory.

So, if you’re trying to be all nosy and find things that you shouldn’t, you’re mostly out of luck. However, with the decline of poorly-secured websites, there has been the rise of Google, so you can use its site-specific search to find all pages that Google has, and by extension you have, access to. Example Google search: “site:ibiblio.org”.

The short version is that if the owner of the site hasn’t taken any action to block you from viewing directories, you can. I often use this as a quick-and-dirty way of putting things online: For instance, if I have a bunch of pictures I took at a party and want to share them with other folks who were at the party, I’ll just toss them all into a directory on the webserver on my machine, and send folks a link to that directory. However, it’s not at all hard to block people from viewing directories, and most professionally-made websites nowadays do so.