Using swfobject to Optimize Flash for SEO
I recently did a post on Flash and SEO, discussing how search engines (primarily Google so far) are now crawling and indexing Flash. The bottom line was that while Flash is still not really SEO-friendly despite recent advancements, there are very good reasons to use Flash in many cases, and there are some excellent techniques to help sites that use Flash to get good SEO rankings.
One of the techniques for helping pages that use Flash to rank well is the use of “swfobject”.
Beyond the benefits to users, swfobject provides important features to help SEO:
- Provides a way to get alternate HTML content visible to search engines (and users who don’t have Flash).
- Makes sure your Flash module will be crawled by search engines that now support Flash.
The first benefit, that of providing alternate text, allows you to provide HTML text “behind” any Flash module. This allows you to provide keyword-rich text content that is easily read and indexed by search engines, while still using Flash to provide a rich user experience. Just code the alternate HTML text just like you would any other HTML, using best practices for SEO (which includes NOT stuffing a bunch of keywords in meaningless text!).
There are a number of resources for getting more information on swfObject. I won’t go into the details here, but here are some links to help you get more information on coding to swfobject and downloading the require components:
Note that there are now two options for coding swfObject:
- Static, and
For SEO, you want to be sure to use the alternate text area enabled by swfObject. You can use standard HTML markup tags in this alternate area, so you can format this content just like any other content on your web page. That allows users who don’t have Flash to see meaningful, attractive content, and it gives search engines full context and formatting information to optimally analyze and index keywords in that text.
Note that using alternate content, which is normally hidden, is not necessarily spam. There are dangers of using hidden/alternate content excessively, especially if you are using that hidden/alternate content in a way that is spam (stuffing keywords, non-relevant content, etc). While search engines may not “trust” this hidden content as much as visible content, and thus rank it a little lower, as long as that content is relevant and well written, it should not cause any problems. The bottom line is to write the alternate content so that it fits the content and intent of the Flash content and your overall website.
In summary, there are a number of advantages for SEO by using swfobject to load your Flash files:
- swfObject provides a way to get alternate content visible to search engines, and makes sure your Flash module will be crawled by search engines that now support Flash.
- It is an industry standard, so should be supported well into the future.
- Alternate content is formatted in HTML, providing excellent support for users without Flash support, and added ability to optimize that content for SEO.
Keep in mind that there are also some limitations with swfobject, which include:
- Alternate (usually hidden) content may not rank as well as primary/visible HTML content, especially if the web page or website makes excessive use of hidden content or tries to “hide” irrelevant content.
- Extra work is needed to develop alternate content.
- There is added testing and QA load, since you need to validate all alternate content.
- Does not solve issues with single page Flash sites (where navigation is within the Flash module and the entire website is essentially within one “page”).
The bottom line is that while Flash is still not “optimimal” for SEO (HTML text still ranks better), swfobject is one way to make sure web pages that use Flash have good HTML text that can be indexed, and that your Flash modules can be found by search engines that now crawl and index Flash content.