
In my daytime job I’m a Flash developer. But when it comes to creating websites I don’t think Flash is the way to go. Not just because Flash has some serious accessibility issues, but mainly because Flash-only websites are very search engine unfriendly. They usually consist of only one HTML page, and most of those contain no readable content. So Google, MSN and Yahoo will have no clue as to what your site’s about. I’ve been pondering things you could do to fix or at least improve this. I’ve played around with a few of these ideas and techniques, others are still on my to-try list. Please let me know if you’ve come up with other solutions or have anything else to add.
1. Use SWFObject.
Geoff Stearns’ SWFObject is the way of embedding Flash movies into HTML pages. It’s only drawback is that it uses Javascript, but in return you get the best plugin detection that (no) money can buy, a fix for the Internet Explorer activation issue and the ability to add HTML content in a placeholder div for search engines and people with no Flash player installed. Put a short summary of what your site about (make sure you use plenty of keywords), along with contact details in there. That way, Google will a least find something it can read.
2. Accomodate deeplinking
Through a bit of PHP(*) and actionscript you can make sure anyone calling up www.yoursite.com/index.php?page=contact is taken to the contact ‘page’ in your flash movie. For a simple timeline-based Flash website the actionscript needed can be as simple as:
if( page != undefined ){
gotoAndStop(page);
}
If your movie has a key frame labelled ‘contact’, it will be shown.

For this to work you need to use PHP to tranfer the ‘page’ url variable into a flashvar. With SWFObject, the javascript code needed in the page will look something like this:
var so = new SWFObject("movie.swf", "mymovie", "200", "100", "7", "#336699");
so.addVariable("page", <?php echo $_GET['page']; ?>);
so.write(”flashcontent”);
Besides the obvious advantage of being able to send someone a link to a specific page, this also allows you to use a Google sitemap. Make sure you include a ‘menu’ listing of these links in the placeholder content so search engine bots can follow them.
A variation to this approach might be to create copies of your index.html with descriptive name like ‘about.html’. These can have different placeholder content but load the same Flash movie. No need for PHP, just add the right flashvar to have the movie skip to the right page. Obviously, this approach is best suited for small websites with only a limited number of pages.
* = Or any other server side programming language. Javascript probably has a few tricks up it’s sleeve as well.
3. Google sitemaps
A Google sitemap is an XML document that you place in your site’s root folder that contains the layout of your site. Google’s indexing mechanism will use this info to index every page on your site. You can simply put the “?page=something” links in there, and each page will be indexed. Especially for large websites, this could be an ideal way to make sure all your pages are spidered. Without having to link to every single one from the placeholder HTML.
4. Dynamic placeholder content
With the tweaks covered so far, each ‘page’ of your website will still have the same placeholder content. Whatever you chose to put in the SWFObject placeholder div. The trick now seems to be to generate a page with placeholder content that matches the content of the page the Flash movie will (initially) display. If you’re using something like “?page=about” in your URL, your movie will load(*) and display the about page. From then on, the user can navigate the site, but the placeholder text won’t change. This is not a problem, as search engine bots will not do this and the sitemap will ensure all of the URLs are called. So all we need to do now is create a script that inserts the “about” page content formatted as HTML into the page’s placeholder div.
If you’re using a CMS type solution, this might turn out to be quite easy. Instead of just generating XML for Flash to read, output that same content as simple <p>’s and <ul>’s and insert that into the page. For static websites this can be a bit of work, as all content needs to be maintained in the movie (or the XML files it loads) and in the PHP code. But if you’re serious about ranking well in search engines, it’s probably well worth the effort.
I’m not sure if Google will like this, any type of dynamic placeholder content might be considered ‘cloaking‘. Your best bet is probably to have the Flash content and the placeholder content match exactly.
* = Most Flash websites I’ve worked load XML data either from disk or through something like SOAP or Flash Remoting on a per-page basis.
5. Adding internal links to the placeholder content
Google sitemaps are great, but unless you create a script to do this for you, updating them can be a lot of work. A more practical solution could be to convert the internal links used in your Flash project into HTML. I’ve built numerous Flash projects that use a single XML document to describe each page. A link from one page to another might look something like:
<next>page2.xml</next>
This tells my Flash movie to load page2.xml when the next button is clicked. If your project uses a similar setup, it shouldn’t be too hard to translate this into:
<a href="index.php?page=page2">next</a>
If you succeed in adding links from your XML source as regular HTML links, your site will be truly indexable. In fact, you’ve now created a working HTML version of your website inside SWFObject’s placeholder div.
6. To the extreme: HTML style page refreshes
Since we’re now using HTML content in the placeholder div, search engine spiders will follow the links in that content and truly spider your website. One further step you could take is to use the same links inside your Flash movie. So if you’re on the about page, and the user clicks on your ‘contact’ button, use actionscript’s getURL command to get index.php?page=contact.
contact_btn.onRelease = function(){
getURL( "index.php?page=contact" );
}
This will cause an old-fashioned page refresh, but it will also update the address bar so people can bookmark all the pages in your site. The Flash movie itself will be cached by the browser, so page load times should be minimal. If you need to maintain user info from page to page, a local shared object is probably your best bet.
There’s also a way to update the address bar through javascript, but I wonder if that works on all browsers and whether it allows for bookmarking. If you can live with the page refreshes, this seems to be the best option.
Conclusion
I haven’t tested all of these approaches myself, and I’m definitely not an SEO expert. But I feel pretty confident that having dynamic placeholder texts that make your website indexable for search engine spiders, along with unique URLs for pages in your website will improve your site’s rankings dramatically. Like with AJAX it’s a question of prioritizing presentation and SEO for your website. Flash is unrivalled when it comes to creating visually exciting websites, but its troublesome to get Flash websites to be accessible and indexable. If you do decide you want to go with Flash, these tips might just help your audience find you.













Awesome info, thank you very much for sharing it. I’m still in diappers when it comes to Flash, but these kind of data is extremely useful for me and other developers around.
Comment by Joe — February 20, 2007 @ 12:30 pm
Thanks for this article Roy. It answered some very timely questions I have!
Comment by Hudey — March 2, 2007 @ 7:55 pm
It seems Google does indeed index Flash content .
http://www.internet-marketing-analysts.com/Google-Flash_tutorial/
Comment by Mahesh — March 5, 2007 @ 8:07 pm
Hi Mahesh,
I’ve actually downloaded the swf2html tool a while ago and I found the results to be very poor. Only static texts were extracted, and those are generally not used for important content. Most content is usually loaded in, and that’s where the tool fails miserably (or at least did when I tested it.
I’ve actually set up a little experiment on this site to get more conclusive results.
Comment by Roy — March 6, 2007 @ 11:22 am
Hi,
Really useful info so thanks for that. Making Flash SEO is a very important subject that the Flash world seems uneasy about. I don’t really understand that, as to me its a pretty basic requirement for a site these days, anyway onto my “question”
I want to create a Flash site that loads in all its copy from either a mysql database or XML files or .txt files (or a combination of any of these). What would be the best methods to make the dynamic content indexable? it seems that its possible to “dump” the content to the page so spiders can see it? or would I create php code that does this? (either dumping the .txt straight, or building XML files?). Or should I use SWFobject, and place the dynamic content on the page with that? and how would I do that? haha, I think you can tell i’m a tad confused about this!
thanks for any advice.
Comment by boombanguk — April 15, 2007 @ 9:56 pm
Hi Bombanguk. Although I didn’t really test it, my personal approach would be to give the main pages for your site a unique url, make sure they’re in your sitemap and then make sure the correct content gets put into the placeholder div.
How to do this will vary from project to project, but you’ll probably need some PHP. I’m not quite sure what you mean by ‘dumping’, but I’de be interested to see what happens when you use PHP’s unclude function to add the content into the page.
Comment by Roy — April 16, 2007 @ 7:15 am
Thnx Roy Great post!
Comment by SEO Handleiding — May 9, 2007 @ 4:53 pm
Thanks for this valuable information.
I have always been put off from using flash in the past.
May be time to reconsider.
Comment by Roger Gordon — May 31, 2007 @ 4:22 pm
To get the best seo results it is the best to make the index page a html text page and continue in flash from there. The recognition of text content remains much better.
Comment by Frits Straatsma | datewereld dating — June 21, 2007 @ 11:05 am
True, but still… any content contained inside the flash movies on other pages will not be indexed.
Comment by Roy — June 21, 2007 @ 11:27 am
Hi,
I have recently been doing an online SEO course and it too mentions that flash sites aren’t very search engine friendly.
Is that right when you say that the search engines don’t see anything in flash?
I’m finding that of late, this website designing stuff is NEVER ENDING. The more I learn - the more I realise just how much I don’t know!
Thanks Roy,
Comment by Anthony Marquis — November 5, 2007 @ 12:24 am
Great post! flash SEO is a niche in its own right! - cheers for the heads up on your take on it! - Bookmarked ya!
Comment by ethical — December 7, 2007 @ 3:29 pm
for point 6, is this link a solutions?
http://www.asual.com/swfaddress/
Comment by chup — December 30, 2007 @ 12:39 pm
There also a free content replacemant JS script available , called ufo js
Comment by edwin — February 11, 2008 @ 3:18 pm
In fact, Geoff Stearns (SWFObject) and Bobby van der Sluis (UFO) have teamed up to create SWFFix, which was later renamed to the familiar-sounding name of ‘SWFObject’.
Comment by Roy — February 11, 2008 @ 3:27 pm
I didn’t think Flash could be remotely SEO. Thanks very much for this post.
Comment by Daniel — July 15, 2008 @ 11:25 pm