The Infinite Loop – Beginner's SEO, Beginner C# & JQuery Tutorials Problem. Problem Solved. Loop. – The life of a programmer

9Mar/100

Google SEO Flash & Flash Tips/Techniques

Google SEO Flash

Google currently DOES index flash, however, I believe it is extremely unreliable. Clients have asked me to do some SEO work on their sites, little did I know, these sites were flash!

Most crawlers seem to have a hard time crawling flash and the #1 tip I can give for Flash SEO is: don't show search engine crawlers flash, show them alternate content!

The reasoning behind this technique:
1) Underlying HTML Content
2) Use javascript to load Flash
3) GoogleBot = No Javascript = Doesn't see flash, sees alternate content

For two of the sites I have worked on, I have used JQuery, JQuery SWFObject Plugin, and a base HTML site to get these sites indexed. Search engine crawlers do not have javascript,  so we will use it to load our flash. If our client has flash and javascript, our client will see Flash. If they dont (Googlebot doesn't have Javascript) they will see our underlying HTML content. Let's take a look at this code:

<div id="flash"></div>
<div id="altContent">
<h1>Google SEO Flash Tips and Techniques</h1>
<h2>How To SEO Flash for Google</h2>
</div>
On your main page, write <div id="flash"></div>, then wrap your Search Engine Optimized code in <div id="altContent"></div>.

As you can see, the content in the "altContent" div, is pure html which we can apply the following Basic SEO Techniques to. We have an empty div above with the id "flash". We will use JQuery & the SWFObject to load our flash file into our "flash" div. Since the flash loading is done using javascript, Search Engine Crawlers will not see the flash, but will see our optimized HTML content.

Download a copy of JQuery here: http://docs.jquery.com/Downloading_jQuery
and SWFObject plugin here:  http://jquery.thewikies.com/swfobject/downloads
We will put all our files in the same directory for simplicity, you can put them in a seperate 'scripts' directory if you want to keep organized.

On our main page, we will add the script references (order is important! first load jquery, then the swfobject plugin):<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.swfobject.js"></script>

Now, underneath this, we will add the function to load our flash file:

  1. <script>
  2. $("document").ready(function(){
  3. if($.flash.available){
  4. $("#flash").flash({
  5. swf: 'main_flash8.swf',
  6. width:766,
  7. height:750
  8. });
  9. $("#altContent").css("display", "none");
  10. }
  11. });
  12. </script>

This code should be pretty self explanatory, but, let me explain:
Line 2: We are setting up a function to run when our document has been loaded.
Line 3:Check that the user has the flash plugin and it is enabled
Line 4: We are using the .flash() method of SWFObject to load content into the #flash div. (# stands for id  . stands for class)
Line 5: We set the swf: parameter to our swf file
Line 6/7: We set the width/height
Line 9: Now that our flash has loaded, we set the display of the altContent div to none, which will hide it.

Since GoogleBot does not have javascript, the code to load the flash and hide the altContent will never run.
If a user has flash, the flash site will load. If not, they will see the html content.

Searching for my clients business name, they could not be found anywhere. Once I applied the technique above, they were #1 within a week (Search engines do take some time :) )

This technique is widely accepted. For some more reading, check out: Google Does Index Flash

Hope this article helps.
Comment if it did!

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • Technorati
  • Yahoo! Buzz
  • YahooMyWeb
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.