views:

342

answers:

7

i.e. http://www.somesite.com/subject?page=3

If query strings are used to control the pagination, won't search engines only be able to index the first page (i.e. the page without the query string)? This is usually how I've seen pagination done, but I'm wondering if there is a better way for search engine indexing?

+1  A: 

I don't think its a bad idea to do pagination using querystrings.

In SO pagination is implemented in this manner.

http://stackoverflow.com/questions?page=2&sort=newest

rahul
+1  A: 

For searching purposes you may decide a constant mechanism for identifying them.

You could consider:

  • the month (blogs do it) or,
  • some sort of internal id range that never changes /r0-100

Probably helpful to have more idea of the content you want to do this on.

If it's a blog, it's no biggie, because the main content of the page changes anyway, so you can just keep the main 'article' as having a 'permalink', and life is good.

Noon Silk
+1  A: 

Google apparently indexes them: http://google.com/search?q=inurl:page=5

yjerem
+1  A: 

Although search engines do reserve the right to ignore very long query strings, they certainly will index pages that use query strings.

Remember, search engines want to index the web... it would be silly for them to exclude URLs like yours, because so many sites use them.

In general, the answer to questions of the form "Are search engines stupid?" is "No." 8-)

RichieHindle
I think you've misunderstood. The point is that using his method, the content on that page *changes*, so there is no point indexing it.
Noon Silk
@silky: No, I don't think I've misunderstood. See the OP's comment to Cyril Gupta's answer. He's worried that search engines will strip off the query string from the URL before fetching it for indexing.
RichieHindle
@silky NO, Google and basically ALL search engines understand and index query strings and recognize that the content is different in correlation to the query string. This is standard practice and not a problem.
Gabriel Hurley
@Gabriel exactly how is it not a problem? Either the content goes out of date, and they need to re-visit, or the maintain old content and it's different when the user clicks through. It is a fact. There is no "solution" to the fact that the content on that page changes.
Noon Silk
The content on EVERY page can change. The point is index.php?page=1 and index.php?page=2 are recognized by search engines as separate pages, and indexed separately.
Lucky
A: 

The truth is if you do not use Querystrings to paginate, you're having trouble because search engines will not be able to access your search content if you do not change the address (which is what you do when you change querystring).

This is exactly the reason why so many websites like to change querystrings when they paginate, so that the search engines can access those urls.

How else can you paginate?

  • Using postbacks to the same page? - Search engine can't follow
  • Using sessions? - Search engines can't follow
  • Using Ajax? - Search engines can't follow

So better paginate using Querystrings.

Cyril Gupta
well the alternative would be using URI routing. I am using codeigniter and the url would look something like /subject/5 where subject is the function that gets called and 5 (the page number) would be the parameter to that function...but it seems overwhelmingly that I should stick to query strings
URL Routing is certainly a great idea and it's SEO friendly. I didn't talk about it because it's not a standard feature of ASP.Net. These days I am working on ASP.Net MVC which makes routing a part of the package.
Cyril Gupta
Gabriel Hurley
Yeah, that's so Google can avoid the URL. When it's a 'pretty' query Google has less trouble marking it a resource that shouldn't be shown higher up.
Cyril Gupta
+1  A: 

It is perfectly fine. Also you can always implement URL rewrite to make these URLs look static. Think about security as well. Quite often page numbers are passed into SQL queries. A simple type-casting to integer would be a good idea.

DmitryK
+1 for security concerns!
Gabriel Hurley
A: 

From an SEO stand point; Make sure the content on each numbered page is somewhat static, rather then changing number (and subsequently url location) as more content is added to the paginated collection of content. That way when Google goes to index your paginated content, the search result's data Google displays will match to what will be displayed on the page when the user clicks to it.

I.E.

Newest content on /blog/ then paginated content's page number ascends. So oldest content is on page 1 (and stays on 1) and so on.

Hilyin