SEO - Relevant Filenames

Filenames: About it

Hello there, aspiring web developers! Today, we're going to dive into the fascinating world of SEO and explore the often-overlooked hero of search engine optimization: filenames. As your friendly neighborhood computer teacher, I'm here to guide you through this journey with some real-world examples and a sprinkle of humor.

SEO - Relevant Filenames

First things first, what exactly is a filename? Well, imagine you're organizing a massive library. Each book needs a unique identifier, right? That's essentially what a filename is in the digital world. It's the name we give to our files, whether they're documents, images, or web pages.

Let's start with a simple example:

my-first-webpage.html

This filename tells us it's an HTML file (that's what the .html part means) and it's probably someone's first attempt at creating a webpage. Pretty straightforward, right?

Relevant Filenames and File Extensions

Now, let's talk about making our filenames relevant. This is where the magic of SEO begins. A relevant filename is like a well-chosen book title – it gives search engines (and humans!) a clue about what's inside.

Here's an example of a not-so-great filename:

page1.html

And here's a much better, SEO-friendly version:

best-chocolate-chip-cookie-recipe.html

See the difference? The second one tells us exactly what the page is about. If someone's searching for chocolate chip cookie recipes, this filename is much more likely to catch a search engine's eye.

Utilising Links with Appropriate Filenames

When it comes to linking, filenames play a crucial role. Let's say you're creating a blog about your travels. Here's how you might structure your files:

travel-blog/
    ├── index.html
    ├── destinations/
    │   ├── paris-eiffel-tower-adventure.html
    │   ├── tokyo-sushi-tasting-tour.html
    │   └── new-york-central-park-picnic.html
    └── about-me.html

Each filename gives a clear indication of the content. This not only helps search engines understand your site structure but also makes it easier for you to manage your content.

Image Filename Optimization

Images are a huge part of the web, and their filenames are just as important. Let's look at some examples:

Bad Filename Good Filename
IMG_1234.jpg eiffel-tower-sunset.jpg
DSC00001.png chocolate-chip-cookies-closeup.png
photo1.gif cat-playing-yarn-animated.gif

The good filenames describe the image content, making it easier for search engines to understand and index them.

A Few Suggestions to Make Filenames Relevant

Here are some tips to create SEO-friendly filenames:

  1. Use hyphens to separate words (not underscores or spaces)
  2. Keep it short but descriptive
  3. Use lowercase letters
  4. Include relevant keywords
  5. Avoid special characters

Let's put these into practice:

good-filename-example-seo-friendly.html

This filename follows all our guidelines and gives a clear idea of the content.

The Significance of Filenames

You might be wondering, "Does all this really matter?" Well, let me tell you a little story. I once had a student who created a beautiful website about exotic fruits. Her content was amazing, but her traffic was disappointing. The culprit? Filenames like "p1.html", "img2.jpg", and so on. After we renamed her files to things like "dragon-fruit-health-benefits.html" and "rambutan-taste-test.jpg", her search rankings improved dramatically!

Filenames are like the addresses of your digital content. Clear, descriptive addresses make it easier for everyone – search engines and humans alike – to find what they're looking for.

Are keywords appropriate for image filenames?

Absolutely! But remember, we're not keyword stuffing here. We're aiming for accuracy and relevance. Let's look at some examples:

Good Filename Even Better Filename
cat.jpg siamese-cat-sleeping.jpg
car.png red-sports-car-racing.png
food.gif spaghetti-meatballs-steaming.gif

The "Even Better" filenames include more specific keywords that accurately describe the image content.

Final thought

Remember, friends, SEO isn't about tricking search engines. It's about making your content as clear and accessible as possible. Relevant filenames are just one piece of the puzzle, but they're an important one.

As we wrap up this lesson, I want you to think of your website as a well-organized library. Each filename is like a book title, giving readers (and search engines) a sneak peek at what's inside. Make those titles count!

Now, go forth and name your files with confidence! And remember, in the world of SEO, every little detail counts – even something as seemingly small as a filename. Happy coding, and may your websites always rank high!

Credits: Image by storyset