Lets take an example of a movie site. So a well structured set of URLs for this site can be:  Movie page - example.com/movies/the-matrixReview for movie - example.com/movies/the-matrix/reviewsTrailers for movie - example.com/movies/the-matrix/trailersSpecific trailer for movie - example.com/movies/the-matrix/trailers/trailer1where its possible to navigate the resource even by directly deleting/appending resource name seamlessly.For SEO purpose I read somewhere that for two given pages, Google will prefer the page which have search query up in the URL hierarchy among other things. So for the given 2 URLs and the query the matrix trailer  example.com/movies/the-matrix/trailersexample.org/trailers/the-matrix/    `  Google might prefer the second URL as it has the keyword trailer at first level comparing to first URL which has trailer at 3rd level (a resource deeper in URL hierarchy may be less important).  If it is correct, one may be tempted to create URL hierarchy somewhat like   Movie page - example.com/movies/the-matrixReview for movie - example.com/reviews/the-matrix/Trailers for movie - example.com/trailers/the-matrix/Specific trailer for movie - example.com/trailers/the-matrix/trailer1 which will break the seamless hierarchy.  My questions are:Is it true that resource deeper in URL hierarchy is tend to be less important when comparing to URLs of other site?  Is sacrificing meaningful, seamless hierarchy worth for this SEO optimization?
Well structured URLs vs. URLs optimized for SEO
seo;url;google search
I disagree with the comment that SEO is extremely complex. Actually, it is common sense stuff. There is no magic, voodoo, special formula, incarnations, specific sequence of buttons and switches, etc. You do not need the voodoo priestess Bloody Mary to come to your house or office. How search engines work is very simple and only a handful of techniques that are well documented in research papers (having little or nothing to do with search) are applied to most algorithms. The largest SEO gyrations are where search engines decide that something is a good idea and in reality, it is not. For example, the notion of keyword exact match domains deserve special weighting that makes it stand out. That was foolish right from the start. Had the keywords had been weighted naturally as they are most everywhere else, we could have avoided that silliness.Having said that.Do not complicate things. Think simple.The notion that a sub-domain performs better as in the comment cannot be counted upon. The only advantage is adding one or two keywords within the URL which is weighted very lightly these days due to the aforementioned weighting of exact domains. You have to contend with the fact that the sub-domain would have to be populated with content as a full site and optimized in of itself in order to have any effect at all. Far too much work for such little gain. As well, it is too much risk.Now on to your question:The reason why, as you mentioned, Google will prefer the page which have search query up in the URL hierarchy, can be explained in how Google and most search engines makes query matches. Let us use your example.To begin:Google weighs keywords from left to right with some exception.Google weighs known keyword phrases more heavily.Google weighs URI keyword phrases/clusters separated by a slash [/] fromleft to right.Google weighs keywords used more frequently overall less thankeywords that are more specific.Google weighs keyword modifiers more heavily.Google weighs keywords based upon popularity trends.Google will remove all special (non-alpha-numeric) characters whenweighing keywords.Using your example, /the-matrix/trailers/Google sees the URI as the matrix trailers. The use of the, a stop word, would normally be discarded as having little or no value, however, since it is part a known phrase The Matrix, the keywords are taken together as a phrase and will weigh higher than they would separately. The use of trailer would be seen in past search history and linguistics analysis as a modifier to the phrase The Matrix and would weigh higher than the phrase itself. This would also be true of the matrix reviews and other similar situations.Also, consider search history and SERP link CTRs. When someone searches for the matrix, they are not interested in The Matrix per se' but something about The Matrix. They are looking for additional information. Generally, a search for the matrix may result in CTR on SERP links that give additional clues. For example, the URI could be /the-matrix/reviews/, /the-matrix/ratings/, /the-matrix/trailer/, /the-matrix/cast/, etc. Each page will experience different SERP CTRs over a period of time. This adds weight to the specific page and keyword modifiers. As well, in overall search for the matrix, keywords ratings may perform better than cast, reviews may perform better than ratings, and trailer may perform better than reviews. But what if the user does not click on anything but does another more specific search? Google often looks for search clues through secondary searches and considers this as important to search intent. In this case, the search is more specific in an effort to create a more desirable SERP link list. The secondary search history may mirror the original SERP CTR for keyword modifiers or not. Still, these are weighed much the same way and may be weighted slightly higher than the modifiers for a search for just the matrix.Google will take the URI and split it at the slash [/] and, in a sense, take the URI segments as an array. The first segment will weigh more than the second segment which will weigh more than the third segment. This is predicated on the notion that sub-directories are more narrow in topic scope than the parent therefore requiring a more narrow search intent and the further away from the home page another page is, the less important it is. So the URI /the-matrix/trailer/ will weigh the matrix more than trailer. Having a URI /trailer/the matrix/ will weigh trailer higher than the matrix. Keep this in mind.Consider how people search. The search query is always ordered in importance from left to right by the searcher when entered. This is because for most of us, we learn to read left to right and hence begin to think in terms of left to right. There are exceptions for other languages of course that Google takes into account. So a search for the matrix trailer would weigh the phrase the matrix higher than trailer. But trailer we know is a modifier and has more weight. Google reorders the search query by weight (and therefore intent) to be trailer the matrix. Since the matrix is a known phrase, the effect would be trailer the matrix. A search for the matrix trailer would result in a different SERP list than if you had quoted the entire search as the matrix trailer. Because Google likes exact intent (pay attention to this word) matches, not exact keyword matches, any match for trailer the matrix, would be placed higher in the SERPs.Okay. It is only slightly more complicated than this, but it all fits within the same realm. So you get my point.On to some other points quickly.Please also understand that it is not always necessary to put keywords in the URL/URI, title tag, or h1 tag to have the same or better effect. For example, I found that keywords found in the description meta-tag and h2, h3, etc. tags can outperform keywords found in the URL/URI which are sometimes totally ignored because they are so common. In this case, I would not put these keywords in the URL/URI, title tag, or h1 tag, but in the h2 and possibly h3 tags. The reason for this is simple. Overuse of keywords by many sites can have a detrimental effect. In this case, Google will ignore some keywords used in these tags and prefer them within content hence the h2 tag. This is because Google will simply prefer content clues over keyword optimization especially very common keyword optimization that is not strong enough to warrant a penalty or even a second look.But what about creating your site for humans? This would mean that the URI /the-matrix/trailer/ would be more desirable? Yes it could be. You have to weigh whether anyone would manually type in your URL/URI or use it in a predictable way. If the answer is yes, then /the-matrix/trailer/ might be best depending. If the answer is no, then /trailer/the-matrix/ may yield more search users with clear intent. It is all about matching the users expectations more than anything. Because no amount of optimization can beat a high bounce rate.So to be more specific, is /the-matrix/trailer/ better or worse than /trailer/the-matrix/? That would depend upon search history. We can never really know this for sure. But it is likely that /trailer/the-matrix/ will match user intent more than /the-matrix/trailer/ based upon what we know about how Google handles searches. The only way to know for sure is to experiment.Let's make one more final consideration. How many trailers would I have for The Matrix? One. But how many trailers would I have on my site? More than one (I would assume). So it makes sense that trailers would be a TLD (top level directory) based upon that notion. Organizationally, this may make better sense.