Question

I want my web-site to be SEO-ed and for which I will be using static URLs (RESTful web services). But in some scenarios, I cant choose which of them(static url/dynamic url) is better.

For instance in search box implementation, user can type in anything, and for that i have 2 choices:

  1. create another static url (like: /something/{query}), which will be more SEO friendly or
  2. create dynamic urls (like: /something?query=somequery), which is less SEO friendly but is used in all search engines I see today.

But then, I want the search results pages to be indexed in search engines (Google, Bing etc), and its a known fact that static urls are better understood than dynamic ones.

I want to know the advantages of the fact that search boxes is implemented using dynamic urls and not static ones.

And finally the answer to the question : When to use static url and when dynamic urls?

Thank you in advance.

Was it helpful?

Solution

Firstly, your use of the terms 'dynamic' and 'static' is erroneous. You're talking about URLs with and without query parameters; both of those can be dynamic. StackOverflow's URLs don't have query parameters, but it would be absurd to call them static.

Anywyay, Google will quite happily index URLs using query parameters. Have a look. I assume any search engine trying to compete with it, like Bing, will too. I don't know if there's a googlejuice penalty associated with the question mark; i'm not sure why there would be, but i would be interested to see some evidence either way.

URLs without query parameters are more human-readable, sure. But bear in mind that for some things, search being the obvious case, users (i think) expect to see query parameters. Users don't think of a particular page of search results as being a page in its own right, they think of it as being the result of a process. They might well like being able to bookmark and email it (i certainly do), but i don't think it's a mental speedbump to them to see a question mark in the URL.

As to why query-parameter URLs are used for search results, that's probably simply because HTML forms use query parameters. If you want to use question-mark-free URLs, you will have to add some nasty javascript, or have your search handler immediately send a redirect to a question-mark-free URL. Both those things are added complexity for no obvious gain.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top