In August 2010, in a very short blog post Google stated that they have started indexing SVG files. As most of you are probably aware, SVG is going to be an SEO gold mine in near future. Why should one worry about alt tags when the image could pretty much “explain” its contents very clearly to a search engine.
I have experimented the following SVG uses cases for SEO purposes:
1. Turn existing XML sitemaps into SVG images
2. Creating SVG infographics with embedded backlinks
3. Dynamic SVG widget that allows you to change the embedded links remotely (Pretty much similar to JSON/XML PHP based widgets)
This blog post will focus on the first use case. I have created a tool that allows you to convert an existing XML sitemap into an SVG image with embedded links. I must make you aware that the tool is very simple, it might not work for complex namespaces (You can’t complain, the entire thing is made with 58 lines of code).
Go ahead and download the SVG Sitemap Tool, it has been developed with ActionScript 3 purely because it was the quickest way of creating the tool. If you would like to get a copy of the source code, DM me on Twitter.
Download one of BBC’s sitemaps for the purpose of this walkthrough i.e. http://www.bbc.co.uk/hausa/sitemap.xml
Using any text editor delete the namespace definition highlighted in the screenshot below.
You must get rid of the namespace otherwise the tool won’t work.
I haven’t implemented error messages or anything so if you are doing this and nothing happens then it is very likely that you have not got rid of the namespace declaration in your XML sitemap.
Run the SVG Tool and load your XML sitemap. If the process is successful you should see something pretty similar to the screenshot below.
Hit “Generate” to convert the sitemap into SVG image and save it, remember to append .svg as a file extension when you are saving else it won’t be saved as SVG format. Now that you have converted your sitemap into SVG, you can go ahead and view the image in SVG supporting browsers such as Google Chrome or Firefox.
You should something similar to the screenshot below. Your XML sitemap is now an image with hyperlinks! Put it on another website and you effectively have dozens of backlinks.
Here is the view source of the above SVG image, notice the <a> tags.
The same concept applies to infographics with embedded backlinks. Use Adobe Illustrator to create your infographic and embedded your attribution link right within it. Every time someone embeds your infographic or any other SVG artwork on their website you automatically get a backlink without even asking for it – say good buy to embed codes etc.
Creating a SVG infographic is not straight forward particularly if you are using fancy fonts/shapes. From experience all I can say is try to use normal system fonts and avoid rounded shapes etc. You can have as many links as you want within an infographic but you have to carry out cross-browser testing because Chrome and Firefox tend to render SVGs slightly differently specially if you are using Adobe Illustrator to create them.
Having your links inside your infographic does not guarantee a permanent backlink as one could easily delete links that are embedded within SVGs, all you need is a text editor.
As far as SVG widgets or banner ads are concerned, save your links in a XML or JSON file and use PHP to render them within a SVG widgt/banner.
- Using this method I have managed to successfully index pages on Google.
- I have not had a chance to measure the effectiveness of SVG infographic (with embedded links).