Search engine optimization is one of the most popular subjects when nerds sit around and talk about Flash. “Does Google index your swf files?” seems to be the most popular question, usually garnering plenty of ‘yes‘ and ‘no’ and ‘maybe’ answers. The real answer to this question, once and for all, is this:
It doesn’t matter.
To understand this answer, you need to understand what Flash is. And to do that, you need to understand modern web development philosophy. First off, you need to embrace web standards. Semantic markup and separating content from style and behavior is the only way you should be building your sites. Many web standardistas have been recommending this method of web development for years, and rightly so. However, this post isn’t the place to go into the whys of this type of development, so I’ll skip that part and just say this about how it’s done: There are three areas of front-end web development: Content, Style, and Behavior. You should always keep these three things separated as much as possible.
That brings up the question: “Where does Flash fit into this three pillar method of web development?” Is it content? Is it behavior? Is it style? While it could be considered all three, most professional Flash developers will remove the content from their Flash movies and load it in using Flash remoting or XML files. That leaves us with style and behavior.
Style is added using CSS. Generally when you add images to your HTML that are purely presentational (no text or required content in them) you should add them in using CSS. In most cases you don’t want Google to index them because people don’t search the web for ‘top left rounded corner gif.” They search for content. Even if Google upgrades their crawler someday to read CSS files and index the images, they probably wouldn’t use the information for more than statistical analysis because of this.
Behavior is generally added using Javascript. Maybe you want a new window to open set to a certain size, or you want to use some fancy Ajax to let users rate something without refreshing the page. This should all be added unobtrusively, and if the browser doesn’t support Javascript, it will hopefully still work. Unfortunately, not everyone considers this, and these days Javascript is becoming more and more of a requirement to use most websites. So you should always provide some sort of alternative for non-Javascript users. When it comes to indexing behavior, Google will for the most part not index your Javascript files. Even if it did, most web users would have no idea what the .js file they are looking at actually does. When using Javascript to change your document, Google will not read the ‘final’ page, but only the raw HTML file. Google does not render Javascript 1.
Now that you know all of this, it’s time to look at how to treat your Flash content. Since we’ve determined we don’t want Google to index our swf files, but we do want it to index the content displayed inside them, what is the best way to go about this?
As stated before, if you are building Flash sites professionally, you probably move all your content out of your Flash movie and into an XML file or keep it in a database. This makes it much easier to allow Google to index this content by using progressive enhancement.
Progressive enhancement is a method of web development that goes hand in hand with Web Standards. You start with your HTML (your content), then add CSS (your look and feel), then add in additional behavior (Javascript, Ajax, Flash, any other interactivity that isn’t handled automatically by the browser).
The best way to add Flash progressively is by using Javascript, or more specifically, a script like FlashObject. First you lay out your page as if you aren’t using Flash. If you are using a database for your content, you can spit out that data as HTML where the Flash movie will go on the page (or maybe just a preview of the content, it’s up to you to show Google the content you would like indexed). Then you use FlashObject to replace this content only if the user has Javascript enabled and the required Flash plugin version.
Here’s a small example of what that might look like:
<div id="flashcontent">
This is replaced by the Flash content if the user has the correct version of the Flash plugin installed.
Place your HTML content in here and Google will index it just as it would normal HTML content (because it is HTML content!)
Use HTML, embed images, anything you would normally place on an HTML page is fine.
</div>
<script type="text/javascript">
// <![CDATA[
var fo = new FlashObject("flashmovie.swf", "flashmovie", "300", "300", "8", "#FF6600");
fo.write("flashcontent");
// ]]>
</script>
This causes Google to skip the Flash swf files and only index the HTML (the content!) you place on the page. You can place links to other pages, images, whatever you want Google to index, and when a viewer with a browser that supports Flash visits your site, they will then see the Flash content. This gives you full control and much greater predictability over what content Google will index. And if your content is pulled from a database that is editor controlled, your pages will update and be re-indexed as the content changes without the need to re-publish all your swf files.
1 Currently Google does not render the Javascript on a page, but there are rumors that they are developing a new crawler based on Firefox (they employ a number of Mozilla foundation members) that will index pages based on how the browser sees them, instead of the raw HTML content. This means HTML hidden by CSS may not be indexed, and pages that are altered by Javascript after they load will be indexed how they appear to the user. However, this is all rumors and until it happens Google will ignore your Javascript content.
Note: In this article I use the ‘Google’ name often, but it can be interchanged with any search engine, as they all work roughly the same way.
thanks for that interesting and helpfull article ! (I prefer the good old html-style anyway…)
I never optimize any flash site. But whenever i will get flash site, i follow above method to optimize that.
From reading the way this works, the javascript uses innerHTML to change the content in the flashcontent div. If this is how it works, then the div is not actually hidden, its only a browser side change of content to the flash. This is a great method, but can someone confirm to me that this is how it works – i’m lazy and I dont feel like diving into the source of the SWFObject. Actually, i’ll be doing it anyway. But it’d be nice if someone here was on the same page as me.
“This seems excellent in theory and we’re considering going down this path with Flex. Does anyone have confirmed success with this approach from a SEO perspective. ”
good point
this method is not working in mozilla browser.
Google can crawl a flash file just like any html file. However it cannot make out anything from dynamic variables, but it can surely decompile flash file to crawl static text.
Just try adding some sample static link in your .swf file and see the magic yourself. You will see link crawled by Google within a month :)
Sumit: It does work in mozilla just fine.
SEO Hawk: I know the googlebot will index swf files, but modern swf development practices usually place the real content ouside of the swf, in xml files or external images, so there is usually no point in having the swfs indexed. I mention all this in the article above.
I’ve just switched to a flash site, hoping I will never have any SEO trouble using Flashobject. Tnx to keep this debate alive.
Andrea
http://www.mygamesale.com/ffxigil/
review
dfgvd
æå·žè£…ä¿®|æå·žè£…饰|æå·žè£…æ½¢
I’ve been using flashobject for a year and I’m happy with it! Thanks for making it.
About 7 years ago I started out to make full flash movies. In the years that followed I moved to (x)html with css and flash, mainly because of SEO. Now with the evolution of flash I’m looking at full flash again. To my opinion, if you do it right, flash can be a great user experience.
FlashObject can make a difference indeed, when it comes to SEO. But what about full flash sites? Like 2advanced.com (yes I know they did a bad job in SEO but I guess they don’t need Google attention anymore). You only got one main swf/container and thus one FlashObject. Suppose your website would contain 25 swf’s with different subjects, all these would have to be included in the FlashObject divs, and Google doesn’t like it when too many subjects (keywords) are put on ONE page.
You could create 25 html pages, but then the flash experience (transitions) will become less.
So how about that? Anyone has suggestions for SEO for a project with 25 swf’s and using FlashObject.
Thanks.
The swfobject works fine. I am using swfobject to display the flash on my site.
If i load the content of my flash using xml will it help search engines to index the site in a better way?
Please explain your view in detail. Thanx a lot.
Please give some reply to my query stated above….
really trying out hard to find this…please highlight your views on it.
Thanx,
Abhilasha
A quite intresting idea is realized in this website!
very good site…..
ok if not the above query then pls throw some light on this query.
I have moved all content out of Flash movie and keep into an XML file.
Will google or any other search engine index my content from xml even if i dont call this xml file from flash.
i.e if i just keep my xml file on the server w/o taking an data from it.
Thanks,
Abhilasha
We just wrote a blog post about using SWFObject & SWFAddress in conjunction with our Flash Framework to achieve the ultimate in Flash website accessibility and search engine optimization. I’d love to hear feedback from all of the experts posting to this thread. Be sure to review the case study on our home page to get the full effect.
What of the Flash Accessibility Class?
Seems to me that these crawlers work like screen readers (JAWS) so… what if you were a full flash site with external files and all, but designed for Accessibility and used: Accessibility.isActive() //flash as2 anyway// function instead of this?
I’m a SEO beginner but anyway I would like to share my doubts. Somewhere above has been discussed if the mentioned method is cloaking or not. The answer was ‘no’ with the argument that the content in the html-code replacing the Flash is the same like the Flash shows to the visitors. So far so good, but how can the Google-robot know if the alternative html-code contains really the same information like the Flash since it can’t read the Flash-contents? Maybe it’s not considered as cloaking but keyword-spamming is possible anyway. At the end it’s something similar like the ‘no-frame-areas’ where you could write the information of the frames and make them visible to browser and robots that can’t read framesets. This was also a highly effective SEO-method until more and more people filled their no-frame-areas with keyword-spamming and Google stopped considering it for their ranking calculations. Who tells me that this will not happen with the mentioned method for Flash as well? Thank you for your answer in advance.
Ok ok, if 2advanced are doing it – it’s got to be right? right? haha.
It still stands, the less content to change – the better.
Google recommends that you create a separate HTML ‘crawlable’ site that they can index – this is basically that same technique, but the HTML + Flash live together on the same page…
What about doing an include?
A client wants an easy way to update content. Can I just use .txt files that flash grabs dynamically, then bring the same text into the html by using an include?
My main concern is that you can’t guarantee every page of your website will be included in the SERPs. Considering I’m constantly adding new products to my company’s website, I need to be sure that customers can find them as soon as possible.http://www.seoptimizerz.com
great atrilce !!!
http://www.jcy818.com
GOOGLE now indexes CSS. And its not for statistical reasons, its for ‘dirty deeds done dirt cheap’. They check the CSS for hidden areas of text to trick the engines.
http://www.sesamii.com
http://www.romaster.com.cn
http://www.iata.cn/
This a great fix, elegant and simple. I do have to agree with an earlier comment about standards, though. I believe in standards and try to follow them as much as possible. Occasionally, however, it is not only convenient but also useful to think outside the box a little. Some standards folks remind me of those in the U.S. who insist that allowing any “outside†culture to creep in, be it through language or any other means, spells instant trouble. What they don’t recognize is that cultures, languages, or coding languages who choose to shut themselves off from the outside world, who refuse to allow outside forces to occasionally seep in, is doomed to stagnate and eventually die. Every authority has its limits.
The other feature I’m really interested in is the USB disk sharing capability. We have a local linux server with RAID and samba shares which does us well for network storage, but I get the feeling that having the option of a dedicated Mac OS formatted drive shared on the network could be really handy. Especially with the small person using her Mac a lot more
Well, the hardware quality that Apple ships has been getting better lately after it’s been going rapidly downhill the last couple of years, it’s not really superb again, but their’s hope. Maybe Apple will start shipping hardware of really good quality again soon. I think they’ll have no choice, because they can’t bond MacOS X no longer to the crappy, over-priced stuff they’ve been shipping for the last years.
i dont think the development of flash sites is now very low . that too with seo Knowledge no body wants a flash site.
any way its great to see flash site optimisation
This is a great article – I have been tasked with adding some flash content to our main homepage within the next couple of weeks and have had major concerns regarding our SE standings. We currently are #4 on a fairly hot keyword. I will try to remember to let you all know what happens to our ranking when we add this flash element to our site using the javascript. Thanks again for the really great article.
When other opportunities such as building massive one-way links from directories and topic-focused reciprocal links are cheap and still work in many sectors, it is hard for many clients to read between the lines.
Why should I have to use a script? And if my visitors have disabled JS but not Flash Player?
I will try to remember to let you all know what happens to our ranking when we add this flash element to our site using the javascript. Thanks again for the really great article.
Google has pretty loose guidlines as far as this topic is concerned.
In one of the affiliate program management team with which I’m connected, most of our affiliate links are documents with swf extensions. My recent problem was when our Affiliate Manager gave me several of these files to be added to our affiliate system, I couldn’t open any of the file. I wasn’t successful even though I’ve already installed flash player. Do you have any suggestion to help us deal with this kind of file?
I couldn’t open any of the file. I wasn’t successful even though I’ve already installed flash player. Do you have any suggestion to help us deal with this kind of file?
I wasn’t successful even though I’ve already installed flash player. Do you have any suggestion to help us deal with this kind of file?
I wasn’t successful even though I’ve already installed flash player. Do you have any suggestion to help us deal with this kind of file?
This method absolutely works. I used Flashobject for displaying flash at my old company. Google did not have any issues with indexing the site and giving us the top rank.
Flashobject is not only lightweight flash detection, it validates!
Geoff,
You’ve sold me as well. I was leaning toward the Satay method, but now realize the reasons why JavaScript needs to be utilized. Thank you.
Please correct me if I’m wrong… The html content that gets replaced if someone has the correct Flash plugin doesn’t need to load at all if they have the correct plugin…correct?
Thanks for serving us with this free and VERY HELPFUL content.
Justin (aka SureFire Guy)
keep up the your great work.
thank you.
I wasn’t successful even though I’ve already installed flash player. Do you have any suggestion to help us deal with this kind of file?
Kredi Kartları her geçen gün daha sık kullanılmaktadır. 2006 verilerine göre kredi kartları ile toplam 108 milyar YTL harcandı. Son verilere göre ise toplam kredi kartı sayısı bir önceki yıla göre %8,7 artarak 32,6 milyon oldu. Mevcut bu kadar kredi kartı olmasına ve bu kadar çok kullanılmasına rağmen kredi kartı yasasının sık sık değişmesi ya da yeni yönetmeliklerin yasaya eklenmesi nedeniyle kredi kartları hakkında birçok şey eksik ya da yanlış biliniyor. 10 Mart 2007 tarihinde Resmi Gazete yayımlanan Banka Kartları Yönetmeliği ışığında kredi kartı ile ilgili son bilgileri ve püf noktaları yazımın devamında bulacaksınız.Kredi http://www.trkredi.com
I wasn’t successful even though I’ve already installed flash playe