0

In my ruby on rails app, I'm showing multiple paginated items on a single page. For a single items pagination, I know how to use pagination and rel='prev' and 'next' attributes and canonical. But in my case, there can be multiple permutations and combinations of a page and this confuses me. From a user's perspective in my case, he/she'll be happy to see different types of information regarding an object on a single page and paginations. But, from a search engine's perspective, it's not that friendly and may cause partial duplicate content. My intention is to get ranked for the index page and google to find the content from the index and paginated pages. Some of these items are accessible from other pages as well in different listings on the separate page. And I also intend to make a sitemap.xml file.

So I have following options:

  1. Keep only index page in the index and make rest of the paginated pages in noindex using robots meta tag.

  2. Use canonical URLs from the request URL and do not use rel='prev' and 'next', because otherwise it'll cause say 10x10= 100 variations of the page if each item has 10 paginated pages.

  3. Use canonical URLs and rel='next' and 'prev' for one of the paginated items and ignore the rest of the URLs or use noindex meta tag for rest of the URLs. I'm leaning toward this solution. So it'll effectively make one pagination on my page and rest of URLs won't interfere with it.
  4. Or I should only use a single page parameter and use that to paginate all other paginated models as well. And when one of the items doesn't have any more pages I should show content from the last page for that item and paginate other items. But I don't know how can I do that using Kaminari? As of now, I'm using three different page_param to paginate these models. I think it'll be the preferred and better solution.

Here is my current code:

def show
        @state = State.published.friendly.find(params[:id])
        @cities = @state.cities.published.sorted.page(params[:page]).per(10)
        @events = @state.events.published.sorted.page(params[:cities_page]).includes(:cities).per(10)
        @articles = @state.articles.published.sorted.includes(:user).page(params[:articles_page]).per(10)
        add_breadcrumb 'States', states_url
        add_breadcrumb @state.name, @state 
    end

And cities page has two paginated items, events and news articles from that city. I'm showing these three paginated items using tabs.

lightsaber
  • 1,481
  • 18
  • 37

1 Answers1

0

Why don't you create some simple index pages just for each type of record, and supply those to the search engines?

Steps to take:

  • Eliminate the combinations of different pagination values in robots.txt
  • Create index (perhaps paginated) pages for each record (state, city, event, etc)
  • Hide these pages to users, but allow robots.txt access

This eliminates some complexity dealing with pagination and indexing.

For reference, I just did this exact solution with three different pagination params and I plan on dealing with it from an SEO perspective.

xHocquet
  • 362
  • 2
  • 11