What’s in a filename? Would a website by any other URL rank as sweet? If you’re asking a search engine, the answer is a resounding "no.” The URL and file path of each web page on your site helps search engines index and rank your website. In a way, it’s a bit like judging a book by its cover—but isn’t that how you browse titles in a bookstore or at the library? You may have the best content in the world, but if a search engine never bothers to "pick it up” and see what’s inside, you won’t rank well in the search engine results pages. Here are some quick tips that will help you craft search engine friendly URLs and filenames.
Keep it Short
Google said it straight up: shorter URLs are better. The ideal range is between 3 to 5 words. Any words beyond that get devalued. And it’s not just a matter of the first three or so words getting counted and the rest just being gravy—all of the words will likely be devalued. In a sense, it’s sort of a microcosm of keyword density. The less words you have, the easier it will be to have a higher keyword to filler ratio. In fact, it should have no filler at all. So, instead of ShoeStore.com/store/categories/pumps/black, try ShoeStore.com/black-pumps
Avoid Dynamic URLs
Data-base driven websites like to structure their URLs with a confounding system of numbers and peculiar symbols. For example, the default wordpress setup will usually display URLs according to post IDs (i.e. http://domain.com/?p=265) while Drupal uses a node system by default (i.e. http://domain.com/node/264). You can change this site-wide in the settings, so that permalinks look more like domain.com/pressure-cookers/16-quart.
Use the Hyphen
When it comes to hyphens and underscores, it doesn’t really make a difference to search engines; both are considered spaces. But hyphens are more user friendly, since underscores look virtually invisible in underlined or hyperlinked text. Front-load Top Keywords
The closer to the front the keywords appear, the more weight they are given, or so suspect the SEO gurus. This is why domain names based on high value keywords go for top dollar (cars.com is probably priceless). Subdomains are the only exception to this rule. Once upon a time, subdomains got special treatment—they were considered on par with entirely different domains. But now, they are treated more like directories. For that reason, clothes.onlineshop.com is just as apt as onlineshop.com/clothes. With this rule in mind, a logical URL structure goes something like primarykeyword.com/secondarykeyword/tertiarykeyword.
To www or not to www
As for prefacing your domain with www., it’s optional. However, when interlinking through your website, you want to remain consistent. Otherwise, you run the risk of splitting your SEO juice in half.
Putting these principals into use is easiest to do before you begin building out pages and content. Deciding upon a solid URL structure from the get go will save you from going through all your links and file names and renaming each one and setting up 301 redirects. Keep this in mind for your next web development project.