Some users are eager to have their albums listed by searchers like Google and Bing, and go to great lengths to figure out how to get higher listings for their sites. This is referred to as Search Engine Optimization, or SEO.
But consider the opposite case. You have albums that are intended only for family and friends, and you don't want the search engines to crawl all over them. How do you get them to ignore your site?
The only way to protect a directory from all unauthorized viewing is to put a password on it, which is probably annoying for your site visitors. But you can at least discourage search engines from indexing parts of your site that you don't want to appear in search results.
The first step is to turn off "indexing" on your hosting account. Say you have this structure on your account:
public_html
public_html/albums
public_html/albums/pets
public_html/albums/pets/fluffy (there's an album here)
public_html/albums/pets/sparky (there's an album here)
public_html/blog (some other stuff, like a Wordpress site)
If you point a browser to
http://example.com/albums, it will look for an
index.html file there - in other words, a web page that can be shown in the browser. What happens if there isn't one? If "indexing" is turned on, the browser will display the directory of folders, and you'll see a listing for
pets. If you point the browser to
http://example.com/pets, and there's no
index.html file, the browser will show a listing for
fluffy and
sparky. So, a search engine will be able to burrow down into your account, even if there are no pages with links to those lower levels.
If you turn off indexing, however, the search engine won't be able to get anywhere. A browser that's pointing to
http://example.com/albums or
http://example.com/album/pets will get a 403 error, telling the visitor that there's no web page there and that it doesn't have permission to view the raw listing of directories. This is handy if you want people to view your pages only if you give them the specific URL that points to them, like
http://example.com/albums/pets/sparky. There's no way a search engine can find
sparky on its own, unless there are
other pages out there that point to that album.
On many hosts, indexing is turned off by default. If it isn't, you can turn it off. In a typical hosting cPanel, there will be an icon labeled
Indexes, often in a
Security or
Advanced section.