Including the topic, the subtopic, and a descriptive file name in a web page's URL fosters search engine optimization (SEO). Because the words that appear in your directory path and file name are indexed by search engines and are searchable, using the names of the directories in the path to classify the content and the file name to describe its subject can bolster a page's standing in search engine results.
In an SEO-friendly URL, the directory path identifies the topic and subtopic of the page and the file name concisely describes its focus. An SEO-friendly URL, then, breaks down like this:
The topic, or highest-level category, and the subtopic, or the subcategory, should be short, typically a one-word keyword. The description of the file's content should also be as short as possible, with multiple words separated by hyphens. All the characters in the URL are set in lowercase. Avoid numbers and special characters, which are hard to read and often don't make sense to users. Here's an example of a URL that meets these URL guidelines:
There is probably an inverse relationship between the effectiveness of using keywords in a URL and the length of the URL: The longer the URL and the more keywords it contains, the less useful it is likely to be for search engine optimization. A best practice, I believe, is to keep URLs short by limiting them to the domain, a top-level category, a subcategory, and a descriptive file name.
Long URLs are unsightly, the product of an untidy mind. What's good for SEO is also good for users: Short URLs are easier to read, easier to manage, easier to remember, and easier to talk about. More: Using descriptive categories in URLs exposes the structure of your site, simplifying site navigation and making it intuitive for users to find the information they want because the name of each directory, or folder, classifies the content it contains. To find a menu page, users can just type the domain name and the obvious name of the topic they want in the browser's address bar. Example:
Many of these URL guidelines, which benefit both SEO and users, expose the weaknesses of using dynamic or nonpermanent URLs for content-oriented web sites.
Dynamic URLs of the type generated by content management systems are offensive on several levels, violating many of the best practices discussed above:
Aligning the folders in your directory path with the structure of your web site not only improves SEO but also eases navigation -- each category naturally contains a menu page for the topic in its folder. SEO-friendly URLs coincide with user-friendly navigation.
The web site of The New York Times provides an example. It organizes its content by topic -- often starting with a traditional news category, such as sports -- and then by subtopic, such as baseball, hockey, soccer, and so forth. The SEO-friendly URL for the menu page of the sports section is http://www.nytimes.com/pages/sports/, but shortening it to http://www.nytimes.com/sports/ displays the menu page, too. And the URL for a sports subtopic, tennis for example, is http://www.nytimes.com/pages/sports/tennis/.
A hierarchical structure that includes main topics and subtopics, all identified by their folder names, shows both readers and search engines where your information resides, helping search engines accurately categorize your site's content. In addition, the descriptive folder and file names are indexed by search engines and are searchable. In this way, using descriptive paths and file names in your URLs can improve your site's ranking in search engines.
-- Steve Hoenisch
First Published: June 18, 2010. Last Updated: June 21, 2010.