Ensuring datatables table content is indexed for SEO

Ensuring datatables table content is indexed for SEO

blabablabablabablaba Posts: 47Questions: 19Answers: 0
edited November 2018 in Free community support

Hi Allan,

My website is split into public | private side.

For public side, I propose to explicitly state the HTML table including data contents, and then apply datatables to that explicit table (like in zero configuration https://datatables.net/examples/basic_init/zero_configuration.html). I call this Option 1.

From my understanding this is the most assured way to get Google to accurately index the contents of public tables.

The alternative solutions for populating data are to:

Option 2: Use datatables to import json data held in the same HTML file
Option 3: Use datatables to import json data obtained via AJAX

I believe Option 2 and 3 are better suited to private side where Google indexing is not a concern.

Do you think I am on the right track by using Option 1 for public side?

Would Option 2 / 3 guarantee indexing on the public side?

Many thanks and hope you are keeping well :-)

Steve

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,667Questions: 1Answers: 10,096 Site admin
    Answer ✓

    Hi Steve,

    One thing to keep in mind here is that Google actually executes Javascript when crawling the web. So option 2 doesn't provide any security against data being indexed, since it indexes the rendered page. You'd also need to be aware that anyone could just "view source" to see that data!

    If you have information that you want to be truly private, you need to have it behind some kind of authentication that the Google crawler wouldn't pass. That could be a username / password, or even an IP address check (e.g. intranet access only to that data).

    Allan

  • blabablabablabablaba Posts: 47Questions: 19Answers: 0

    Thanks Allan, I am specifically trying to confirm which option will allow Google indexing.

    As you have indicated Google can execute the javascript in Option 2 so I will use that as I think it's slightly less verbose to generate the table from JSON.

    Many thanks!

This discussion has been closed.