Basic HTML: Naming Web Files

Naming Web Pages

Every web page has three different names. WOW!  No wonder it's confusing. But it's important that you understand the difference between these names. Each name has a specific purpose. Names 2 and 3 can affect the way your web site functions, and how search engines index your site so other researchers can find it.

Name 1: The title that appears on your page

This is the one your visitors will probably see first, and can be anything you like:

My Kissin' Kuzzins
The Hatfields and McCoys of Arkansas
Letters from the Ohio Volunteer Infantry during the Civil War

This "name" is like the title of a book and is used to catch your visitor's attention. It doesn't even have to be text on your page. You might use a title graphic instead. So while this name is important to the appearance of your page, it does not affect the way your site functions, on the server or on the web.

Name 2: The name between the <title> tags:

This is the name that appears in the title bar of the browser window. If you look at that title bar now, it should say Basic HTML: Naming Web Files. This is not quite the same as the name that appears at the top of the page; but they don't have to be the same. In fact, they can be totally different. The <title> of your page should be something that is meaningful to a search engine. If you want search engines to effectively index your site, "Kissin' Kuzzins" is not much help. Try to be specific with something like "Buxton and Rose Families in Ohio"; "Parker Genealogy, 1732 to 1900", or as on this page, the site name and subtitle. If you haven't looked at any of your HTML yet, and you have no idea where to find your <title> tags, see VERY Basic HTML.

Name 3: The File Name

This is the name you give the file when you save it for the first time. Like any computer file, it must include the file name, and a file extension to indicate the format in which the file has been saved. The file extension tells a computer what program(s) will open the file. Web page files use the extensions HTM or HTML.

There are some special do's and don'ts for naming web files.

Do not use spaces or special characters in file names. Valid file names may include letters, numbers, and the characters dot ( . ) dash ( - ) and underscore ( _ ). The dot/period is reserved for use between the file name and the file extension (only one per file). All other special characters such as # " & % , etc., are reserved for the HTML code itself. Using them in a web file name will often result in an HTTP 404 - File Not Found error.

Yes These are valid file names spacer No These are invalid file names
james smith.html
John&Mary's Wedding.JPG
R. Walker.html

Do keep the file names short. While file names can now be longer than the 8 letters allowed in DOS, extremely long file names can cause problems for some servers. Use subdirectories to sort and identify your files so the filenames themselves can be kept relatively short (say 12 to 15 characters).

Upper and Lower Case Matters

Each URL must be unique so one particular file can be located out of the billions of pages on the Web. Most web servers are case sensitive.  On the web,

surnames.html, Surnames.HTML, SURNAMES.HTML

are all different files. Remembering this basic rule is the key to making your links work. Many people find it easier to always name web files in lower case. Then you don't have to remember whether your link should be written to James-Smith.html instead of james-smith.html.

At Home at FreePages

Your entry page at FreePages should be named index.htm or index.html. Remember, Index.html with a capital "eye", is not the same thing. This is the default page delivered when your URL is called, which allows you to use a "short" version of your URL:
instead of

It also prevents your visitors from seeing a complete listing of the contents of your directory. If you do not have an "index" file in a directory, then the server will return a listing of all the files in the directory.

index.htm(l) is also the page that is indexed in the FreePages Directory. It is indexed according to what appears between the <title> . . . </title> tags in the <head> section of your HTML. Articles such as "a" and "the" are ignored.

<title>A Smith Family</title> will be indexed under "S".

<title>The Smith Family</title> will be indexed under "S".

<title>Smith Family</title> will be indexed under "S".

<title>My Smith Family</title> will be indexed under "M"

See How do I get listed...

Pat's Web Page Tutorials
Copyright 2000-2018 Pat Asher