Field Notes Inside an Integrated Communications Agency

Naming HTML files and folders

I'd like to share something we learned last week in our "Say Hello to HTML" class taught by the web wizard himself, John Romano. Naming HTML files appropriately is just a little something that can help out in a big way. So when you're naming your files and your folders, remember these key things.

  • No spaces, punctuation or special characters.
  • No periods. This helps prevent broken links.
  • No underscores, use hyphens instead. Google will identify separate keywords between hyphens.
  • Use all lower case, people are less likely to make typos.
  • No fancy naming conventions, use direct labels that reflect the content. This will help everyone identify a file's content before even opening it. Also, Google likes having a file name that is related to the content.
  • Remember: save your files as close to the root directory/index as is feasible. The farther away your files live, the less visibility they get.

If you do all of this, not only are you making our developer's lives a little easier, you'll get a little Google love to boot.


  • virginia 12:35 a.m. Mar 08, 2008

    To answer Mindy's question, the file name will help with SEO. It's not going to get you front page results or anything, but so much of SEO work is just doing it right. Naming files correctly. Coding correctly. Being accessible with your code, etc.

  • John 10:19 a.m. Mar 07, 2008

    A blog article about naming files?! You make your teacher so proud.

    Smart and effective naming conventions are both a result and extension of good information architecture (the structuring of information).

    Keep up the hard work,
    Your friendly neighborhood HTML teacher

  • Mindy 9:45 a.m. Mar 07, 2008

    Though this isn't about attracting Google, it brings up a pet peeve of mine about naming pdfs on sites. Name it something that makes sense to the user. I hate looking at downloads the next week or next month, trying to figure out what the heck 2006-04-23condocfinal.pdf contains. Too often documents are named according to a system that is lazy [like the simplistic file.pdf] or follows an internal filing system, but is utterly useless to users. For example, we might name files according to date published. A user is looking for the name of the article or the company name. We need to see it through their eyes.

    I wonder if this affects how Google sees pdfs on sites as well? Does it help SEO to have keywords in pdf file names?

  • virginia 8:28 p.m. Mar 06, 2008

    Spaces are extra tricky in URLs. A [ ] is replaced with a %20, which can be very confusing. When adding PDFs or Word documents, you need to make sure there are no spaces in the file name as well.

Post a comment

We look forward to hearing what you have to say. Before joining the conversation, please take a moment to review our comment policy.