Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Source Link

Dynamic content generated via a PHP Filter field is not being indexed by Google

We just moved to Acquia Cloud hosting and we've realized that a few of our pages aren't being indexed by Google.

There is a distinct difference about these pages that is probably at least related to the cause and that is that these pages are generated by PHP encapsulated in the body field of a page node. Said PHP queries a non-acquia database and builds the page. The important piece of this is that the page looks at GET variables to build the query string, namely a variable called 'id'. The URL is then the page node's alias concatenated with ?id=XXX where XXX is the id of the element for which to query.

I know this is by no means best-practice for a page node and we are in the process of converting this functionality to module but, for now, we have what we have.

When I 'curl -IL' one of these pages with the ?id=XXX appended (i.e. http://www.domain.com/site/aliasPart1/aliasPart2?id=XXX), I find in the return:

Link: http://www.domain.com/site/node/24490; rel="shortlink",http://www.domain.com/site/aliasPart1/aliasPart2; rel="canonical"

the GET variable is getting truncated!

It looks like that's why Google isn't indexing these pages. My question for all of you is: is this why Google is not indexing these pages? If so, what can I do to fix it?

Thanks, Tim