When working through the architecture and coding of a website the URL structure is often overlooked. Carefully considering the location of your pages can greatly help users by making links semantic and easy to remember. It’s easiest to start this process when doing a redesign or a new site, but its worth investing the time and effort at any point.
When determining your URL structure, the first place to start is with your site’s architecture (site map / navigation). The structure of your URLs should reflect how your users navigate your site. Typically, you’ll want to find large buckets and group your content using directories (yourdomain.com/company – yourdomain.com/products – yourdomain.com/articles). You should have an index page in each of those directories that leads to any additional content within, which can be in their own subdirectories. Apple does a good job of this, creating consistant URLs where expected, like apple.com/iphone & apple.com/iphone/features.
Folders vs Subdomains
I recommend using subdomains (e.g. products.yourdomain.com), as alternative to folders, only when there is a clear division of content. For example if you ran a second site that is intended for another purpose entirely from your main site, such as a site for investors, a subdomain may be a good choice. In Apple’s case they keep their marketing product information at apple.com and their online store at store.apple.com. There are several reasons for this, but the biggest two in my mind are that search engines typically consider subdomains as a different site when indexing and that many users aren’t savvy enough to understand subdomains (if you create them make sure you can type www before the subdomain and it will still forward correctly).
Semantic URLs can become difficult when creating dynamic product or article pages. There are many sites with pages like this domain.com/store/product.php?id=1234 instead of something more logical like domain.com/store/productName. If you’re using blog software like WordPress you can easily change this setting. In WordPress simple go to settings > permalinks and choose one of the available options or create your own structure. For users of CMS systems take a look and see if such an options is available; if not take a look on google for “URL Rewriting” to create custom paths to your content.