Is it better to have keywords in the URL path or filename?

Is it better to have keywords in the URL path or filename? - answered by Matt Cutts

Matt's answer:

Matt Cutts: We’ve got a good question today from Alex Black in Waterloo, Canada. Alex asks, and it’s kind of a long question so we’ll go through it, “It seems that having relevant keywords in URLs is very helpful.” Agreed. “Does Google give higher importance to keywords in the path versus the filename? For example, example dot com slash tools slash hammers slash acme dash metal dash pounder or example dot com slash tools dash hammers dash acme dash metal dash pounder? [ makes snoring noise ] Oh ah, sorry. Okay. If you were fallin’g asleep during that question, I’ll try and make it a little more concrete. Would you rather have stuff in the pathname or would you rather have stuff all together at once in the, in the file name? To me, the answer is that it really doesn’t make that much difference. This is a perfect example where you can do some questions, you can do some experimenting and see what works for you. Think about it like a user though. A user would probably prefer something like tools, category is hammers, type of hammer is acme metal pounder. W whereas a lot of users, especially savvy users, if every single thing is in the file name; — if the file name is tools dash hammers dash acme dash metal dash pounder,  — that can be – it can start to look a little spammy. A and it’s not that we have some factor that says the more hyphens you have, the worse you are automatically. It’s just users might not click on it because ‘cause they might not think of it as being as quite a good a search result. Ss so if there is a clear sort of delineation of categories where you can have stuff in the path, I would probably, just for user experience, go with the path. As far as search engine ranking, I’m not sure that there’s really that much difference between the two. B but you might want to be a little careful because of the user experience of having a really long filename that’s just stuffed with hyphens. People might not like it if they see dash dash dash, dash dash dash and so they might not click on it.

by Matt Cutts - Google's Head of Search Quality Team


Original video: