Being sure that you create file names and therefore URLs that search engines like is very important and surprisingly easy when you know the basics.
In general, URL structure for SEO optimization follows a general rule that:
The more generic your keyword – the earlier you want it in your URL structure.
For instance, if you are trying to rank for a very competitive and extremely generic term like ‘music’ that returns more than a billion search results at Google, you definitely need to place that keyword in the domain. With such a generic keyword only placement within the domain name will have heavy enough benefits at this point to make a significant ranking difference.
However, if you want to score for a less competitive keyword like a specific cell phone model, using your keyword (the model number of the phone) as a subdirectory or file name will typically work quite well. Again – don’t over do keywords in your URL. A good rule of thumb is this:
If the URL looks like spam, it probably will be treated as spam.
The search engines caught on a long time ago to the www.viagra-pills-casino.com/ style domain names and file structures. Today you want to use domain and file names that are common sense to the human visitors of your site. Always bear in mind that people do look at the file names within the search results. And seeing the keywords highlighted in the URL does increase click-through-rates.
Again, be sure your keywords are in the URL in a way that looks natural and only once. You don’t want to have them in there more than that or it looks spammy.
To learn the more about Subdomains, Static vs Dynamic URLs, File Extensions, Dash vs a Hyphen and so on see this article.