File name length Vs SEO friendly file names

Hi all,

I’m in the process of generating a new page for every article/major piece of content.

From what I know (and what’s still good practice SEO wise) it pays to have the string from the page’s h1 tag in the file name.

My dilemma is where to we draw the line in terms of file name length if our h1 is a long title? Of course we could have word1-word2-word3-word4-word4…word15.php etc. but then the file names get very long.

We do just go for the full name file length or do we simply cut it say after 60 chars?

Many thanks,

For that sort of scenario all you need to do is name it something like http://www.mysite.com/faq/201/ or http://www.mysite.com/faq/first-steps/ - keep it short keep it simple!

Thanks for that.

So from what you’ve written it seems you’re with the belief that page <titles> and <h*>'s don’t necessarily need to confirm to the file name and vice versa, and that this doesn’t lower SEO potential? …and that the essence is basically to just stuff some meaningful keywords in the file name which are/aren’t necessarily in the <title>, <h*>'s or even <p>'s?

Constructing short <title>'s thus <h*> in effect is great but it can be a real bummer if the content is a FAQ page and the question the page answers just happens to be long winded.

Thanks for your comment.

I get what you’re saying. It all boils down to the question of what’s a consistent way to go about naming file names on the web.

You say some keywords relevant to the title and h*'s should be in the file name, sure, but do you mean I should simply pick those I believe to be relevant (or know I’m targeting) or mix and match with the other words from the content’s title since at the end of the day it doesn’t really matter?

I just want to settle on a consistent “standard” if to call it that, a naming schema which I will stick to for years to come as it’s not ideal to go changing file names (thus links) down the line (manual workload, 301’s, re-indexing issues etc.), especially on a website that’s got respectable page rank, backlinks etc.

On one hand it’s a trivial problem, on the other it’s a really good idea to decide it upfront and stick to it over time (at least until a major site refresh).

Say a content’s title would be “How to invest in stocks with an unstable US economy and still keep risk under wraps”

Would I call the file name for that page?
a) How-to-invest-in-stocks-with-an-unstable-US-economy-and-still-keep-risk-under-wraps.php
b) How-to-invest-in-stocks-with-an-unstable-US.php
c) How-to-invest-unstable-US-economy-risk-under-wraps.php
d) something completely different

I think the whole idea of making the URL up of the entire fifteen word headline is mad! I agree that having relevant word(s) in the filename is helpful - not only for SEO but also for usability, it’s much easier for users to find a page where the URL is something meaningful.

However, that only makes sense when the URLs are short enough to be easily typed in, and it falls apart when you have news/magazine sites that have new content continually added that often overlaps with previous content.

So a URL like reference.sitepoint.com/html/script works well, because it shows what the page is about, it shows where the page fits into a well-defined hierarchy, and it’s easy to re-type. That’s all great.

But what about a news site or a forum? Take this page here. In reality, it’s called sitepoint.com/forums/showthread.php?p=4670937. Would it be any better if it was sitepoint.com/forums/seo/file-name-length-vs-seo-friendly-file-names.php? Not really. It’s too long for most display purposes, and it’s too long to expect people to type in, so it has poor usability. The advantages you might gain from having keywords in the URL is outweighed by the disadvantages of having an unmanageable URL.

If you’ve got appropriate <title> and <h*> elements on the page, and appropriate link text on your site navigation, search engines will easily be able to figure out what the page is about, and the URL doesn’t need to spell it out. If you can include relevant keywords in a concise URL, that’s good, but if you can’t, you’re in danger of making things more difficult for your users.

Whoa … that’s a title and a half, no wonder you’re having trouble forming a URL from it. Way too wordy, by the time people have got to the end (if they even scan that for along) they’ve forgotten how it began. Starting a title with “How to…” is the written equivalent of saying “Um…” at the beginning of a sentence, it’s meaningless filler. Start your headline with the punchy words, and keep it punchy. How about Low-risk investing in an unstable economy? Your filename could then be “low-risk-investing.php”, which is short enough to be memorable.

Another tip would be to steer clear of capital letters in file and folder names. The general convention is that URLs should all be lower-case - some servers are case-sensitive, so anyone typing in the URL without the capital letter could just get a 404 error, and that isn’t good.