I have a page which dynamically loads a section of content via AJAX. I’m concerned that this means the content will not be found by search engines.
To show you what I mean, the site is at http://www.gold09.net and the dynamic content is at /speakers.php – Normally no one would visit that second link, it’s just loaded into the first page.
I know I can tell the crawlers to read the speakers.php by using a sitemap.xml, but then I’ll get links to the speakers.php showing up in search results.
I guess the ultimate solution would be so that if someone requests /speakers.php it redirects them to the main page, whereas it lets crawlers read the data.
Any suggestions?
Update: What I’ve done is this:
Created another page called
viewSpeakers.phpwhich just includes thespeakers.phpfile with the standard header and footer around it. This means that if someone goes to that site, then they’ll see a vaguely attractive page. The only links to that page are in the HTML of theindex.phppage (where it immediately get removed via javascript) and in my sitemap.xml.The effect of this is that the search engine crawlers and users who have javascript disabled get to see a link to information about the speakers. People who have javascript enabled get the AJAXy goodness of the data being loaded dynamically on the same index page and they never have to know about the
viewSpeakers.phppage.The only downside I can forsee is that someone might come to the
viewSpeakers.phppage via a search listing, and then not be able to find a link back to that page from theindex.php. Not really too much of a problem…This was added as an answer, rather than editing the question, because it’s one way to solve this problem. I’d still be interested to know if there’s a better way than this.