An ASP.NET Ajax SEO Idea

This is my first post on here so I hope it is helpful.

I was playing around with an idea of making a site where the content was loaded into the page with ajax. So I changed my links to LinkButtons and made these pass the ID of the page to load.

After getting this running I thought to myself, using these link buttons I have just hidden all my content from any search engine as the LinkButton's href attribute is a javascript call and a searchengine will not be able to follow this. Then I came up with an Idea, wh not change the link so that the normal href would pass a query string with the id to the page to load this way if the user has javascript off or a search engne is crawling the site they will still be able to see the content, and if the user has javascript on they will get the ajax based version of the site.

To this this I did the following things:

1. Set the href attribute to be the non ajax version of the page i.e. page.aspx?ID=x
2. Add an onclick attribute which would be the javascript postback, which inturn would use the ajax based version of the page.
3. On the page load check to see if the ID is passed in as a query string and if so load the content.
4. Handle the onclick of the LinkButton to load the content using AJAX.

An issue with this is that by adding a secound href attribute there are now two, the original javascript one and the new url based one, I dont think this is ready just yet for use, but I will be making a new SEO friendly link button control soon.

 

Hope you find this useful, any feedback would be good.

Cheers

Stefan Sedich

Published Saturday, November 03, 2007 12:57 PM by stefan.sedich
Filed under: , , , ,

Comments

# re: An ASP.NET Ajax SEO Idea

Saturday, November 03, 2007 1:43 AM by Zack Owens

This sounds a bit like Black Colar SEO work to me.

# re: An ASP.NET Ajax SEO Idea

Saturday, November 03, 2007 2:24 AM by stefan.sedich

I think I labeled the post wrong it should have been an Accessibility Idea. What does black collar mean?

# re: An ASP.NET Ajax SEO Idea

Saturday, November 03, 2007 6:35 AM by Cyril DURAND

This is exactly what I done with my crawlableLinkButton control :

you can read my explanation post here blogs.developpeur.org/.../referencement-updatepanel-solution-crawlablelinkbutton-seo-ranking.aspx

and find the source code here www.aspfr.com/.../CRAWLABLELINKBUTTON-UPDATEPANEL-REFERENCEMENT_44402.aspx

# re: An ASP.NET Ajax SEO Idea

Monday, November 05, 2007 4:49 AM by werwer

this is callled cloaking and get will get yo ubanned from google

# re: An ASP.NET Ajax SEO Idea

Monday, November 05, 2007 7:16 PM by stefan.sedich

So you are saying that a link with an onclick to say perform an animation or something else will also be seen as cloaking?

# re: An ASP.NET Ajax SEO Idea

Thursday, February 07, 2008 4:19 AM by ebirbal

You could be doing something like this for completely genuine purposes too... onClick() for browsers that support javascript and a regular href for the rest.

Whats cloaking about it ?

# re: An ASP.NET Ajax SEO Idea

Thursday, February 07, 2008 10:24 AM by stefan.sedich

Hello,

I thought this too, I am being 100% genuine in being able to provide my users with a accessible website. I am not hiding anything here or being shifty :P. I have heard about cloaking and I may need to read up on it to make sure, but if this is the case thats just crazy.

Thanks

Stefan

# re: An ASP.NET Ajax SEO Idea

Tuesday, August 05, 2008 9:21 AM by K

looking forward to the time when SEs can simply follow the javascripts and examine the resulting dom. maybe a good idea to write my own not so stupid SE.

# re: An ASP.NET Ajax SEO Idea

Tuesday, March 17, 2009 9:56 AM by Sean Amos

I know I'm a bit late to the party here.

Having the href attribute and onclick attribute set to avoid SEO problems while using javascript is an acceptable solution.

It is not considered cloaking by Google, and is in fact their recommended solution. See this post on the official Google Webmaster Blog: <a href="googlewebmastercentral.blogspot.com/.../spiders-view-of-web-20.html">A spider's view of web 2.0</a>

Leave a Comment

(required) 
(required) 
(optional)
(required)