Jump to content

Does google index ajax-based websites?


rantsh

Recommended Posts

As some of you may or may not know I am developing a spanish website for a store http://beta.amairca.com and for us it is very important to show up first in google. or to have at least some presence in its search results.

 

I have developed this site using ajax, but now I do have a question I should've asked myself before starting... Do ajax based websites get indexed by google? Yes I know youtube gets indexed, but the difference between youtube and my site is that I load everything in a div while they do have real links that reload the page.

 

Anyway, I'm on the final phase of development now so there's nothing I can really do about it... But I'll like to know so I can have this in mind for my next site...

Link to comment
Share on other sites

The only reason that a search engine would not index your site is that you would be updating the content without updating the url. You can easily process the present url with javascript. Here is an old post of mine on the subject http://www.phpfreaks.com/forums/index.php/topic,111729.msg452963.html#msg452963 . You may find it useful and should be pretty simple to incorporate something like that into an existing site.

 

Tom

Link to comment
Share on other sites

The only reason that a search engine would not index your site is that you would be updating the content without updating the url. You can easily process the present url with javascript. Here is an old post of mine on the subject http://www.phpfreaks.com/forums/index.php/topic,111729.msg452963.html#msg452963 . You may find it useful and should be pretty simple to incorporate something like that into an existing site.

 

Tom

 

Hi Tom,

 

You're right your implementation of ajax on the linked you posted is quite simple (not to mention that it's ajax before someone had a name for it).

 

Now, on ajax you never do change the URL do you? on the contrary you only change a layer on an html div... which gets up back to the starting point... will google index a site that's 100% ajax ??

Link to comment
Share on other sites

See the key is to have a site map and to incorporate something like that into your site. So when the crawlers come they can directly link to the content but at the same time the user would be using the pure ajax version. here is an example of what I mean..

 

window.onload = function () {
    var check = checkUrl();
    if (check !== false) {parseUrl(check)};
}

//this will check the url..
function checkUrl() {
    var url = window.location.href;
    var parts = url.split("?");
    if (parts.length > 1) {
        parseUrl(parts[1]);
    } else {
       return false;
    }
}

function parseUrl(info) {
    //do something here with the url
}

 

So in this basic example you will see that it will only process the url if there is a ?. So the user could use the pure ajax version while at the same time you can link back to a certain pages content.

 

Tom

Link to comment
Share on other sites

the search engines will only index your home page:

http://beta.amairca.com/main.php

 

Only the initial loading of that page would be indexed, content later included in the page by ajax would not be indexed.  As well, the search engines will only see what that page looks like if you turn js off and go to the page, search engine spiders do not execute any js.  On the subject of urls with '?' in them, search engines do not index pages with the question mark in the url.

 

You definitely need a work around with a site index page.

Link to comment
Share on other sites

Ideally, how extensive should this go?  I've heard from some people that you only need to make a few static pages, and have a complete site map that links directly to every individual page, and have that linked off your main page.

 

Does one really have to go through and make an entire Ajax free website, or does just have the site map and a few static pages work as well?

Link to comment
Share on other sites

Just leave the rest of your home page the same and put a NOSCRIPT tag at the beginning of the page with stuff in it for the search engines to munch on.  Put links to the other pages in it and stuff like H1 tags and plenty of keywords.  Put a message in highlight to tell regular users with js turned off that they will get a better experience if they turn it on.  Make it very simple html for search engine munching and put it at the top of the page because search engines like that best.

Link to comment
Share on other sites

  • 1 month later...

In my opinion, there are two main issues to bear in mind when Search Engine Optimizing AJAX:

 

  • Problem #1: Lack of content and navigational links on initial page load. This is a problem because the initial HTML page load is all the search engine spiders will see. Search engine spiders do not read JavaScript. Period.
     
  • Problem #2: Lack of unique URL's for search engines to index. AJAX makes it easy to serve all your content on one page, just like Flash. Unfortunately, search engines need unique URL's.

 

However, each of these problems has a solution.  ;D

 

  • Solution to Prob #1: The initial load of the page definitely needs to contain valid HTML content and navigation.
  • Solution to Prob #2: You need to think like a search engine spider when creating the structure of an AJAX site. Make sure that they can get to a unique page with valid, quality content. You can still have dynamic pages, but you may want to consider using URL rewrites to create unique Search Engine Friendly URL's.

 

If you're interested, here's more info on AJAX SEO.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.