HomeSEOOn-Site SEO - Part Five: Filenames and URL Structure

On-Site SEO – Part Five: Filenames and URL Structure

In our previous post on the topic of on-site SEO, we discussed the importance of choosing well-branded, SEO-friendly domain names. This is the crux of creating well-optimized URLs for your website, but the details matter, too. There are numerous opportunities to introduce keywords into your URLs by following best practices for filenames and directory structuring. Here are a few bases you should definitely cover:

Dynamic URLs

Many dynamic websites, such as blogs, will generate notoriously user and search engine unfriendly URLs. The default WordPress permalink structure is a common example. Posts are typically numbered, rather than given proper filenames and will show up in your address bar like this:

This is a big missed opportunity for including keywords. Instead, setup your permalink structure to read and populate both those elements with keywords (without repeating). So, instead of having just one keyword in your URL (from your domain), you can have, a total of three quality keywords.

URL Length

Brevity rules in almost all aspects of marketing. Shorter URLs tend to rank higher in search engine rankings and are easier to copy, paste and share. Some email and IM clients make it difficult to click URLs that span more than one line and the more gobbledygook that’s in your URL (numbers, symbols, etc.), the less trustworthy it looks.

Keyword Location

Just like search engines prefer keywords to appear early in the content, they also give more weight when they appear closer to the front of a URL. Avoid introducing lots of folders and subfolders. The example from above is better than say,


The jury is still out on how search engines will treat  subdomains in the future. In the past, setting up a keyword as a subdomain was beneficial for SEO (i.e. as they could be read as a different, highly relevant keyword relevant domain. But this opened the door to some abuse, since webmasters can register a virtually infinite number of subdomains free of cost.

Today’s best practices are to use directories and folders rather than subdomains unless you’re trying to clearly cordon off a section of your website with distinctly different content. For example, makes sense, since it’s a different section from your merchandise. You won’t be penalized by using subdomains – but you likely won’t see any real benefit from abusing them, so it’s better to stick with what’s logical and intuitive.


Spaces in domain names must be separated by hyphens, but there’s a little bit more leeway for filenames and directories. You can choose underscores, periods or plus signs, if you want, but convention dictates the use of hyphens. There is little question regarding the fact that search engines read hyphens as spaces, and consistency is best practice as policies develop.

Image Filenames

You should pay careful attention to the filenames of all of your website elements, but images represent an even greater opportunity. There’s much web traffic to be garnered via image searches and the filename plays a large role in how your pictures are indexed. When uploading digital photos and other images, it’s easy enough to keep them with their default and generic filenames (DC00012.jpg or image2.png) but you’ll get much more mileage by giving it a short, descriptive filename (red-kitchenaid-mixer.jpg or granite-countertop.png).


The takeaway lesson when it comes to optimizing URL paths is to stick to what makes organizational sense and take every opportunity to include a keyword. Avoid obviously spammy tactics or exploitative “tricks” – the benefits from these tactics will likely be short-lived and may ultimately detract from the usability of your website.