Programming Languages and SEO
One aspect of web-site design you might not think of when planning your SEO strategy is the pro- gramming language used in developing the site. Programming languages all behave a little differ- ently. For example, HTML uses one set of protocols to accomplish the visuals you see when you open a web page, whereas PHP uses a completely different set of protocols. And when most people think of web-site programming, they think in terms of HTML.
But the truth is that many other languages also are used for coding web pages. And those languages may require differing SEO strategies.
JavaScript
JavaScript is a programming language that allows web designers to create dynamic content. However, it’s also not necessarily SEO-friendly. In fact, JavaScript often completely halts a crawler from indexing a web site, and when that happens the result is lower search engine rankings or complete exclusion from ranking.
To overcome this, many web designers externalize any JavaScript that’s included on the web site. Externalizing the JavaScript creates a situation where it is actually run from an external location, such as a file on your web server. To externalize your JavaScript:
should be placed where the JavaScript will appear and might look like this:
<script language=”JavaScript” type=”text/javascript” src=
“filename.js”></script>
This is just one of the solutions you can use to prevent JavaScript from becoming a problem for your SEO efforts. There are many others, and depending on your needs you should explore some of those.
NOTE
Sometimes, people use JavaScript as a way to hide content or links from a search engine. However, search crawlers can read JavaScript and most can even follow the links that are in JavaScript. So if you try to hide content or links behind JavaScript, you run the risk of having your site labeled as search engine spam. There’s more about search engine spam in Chapter 17.
Flash
Flash is another of those technologies that some users absolutely hate. That’s because Flash, though very cool, is resource intensive. It causes pages to load slower, and users often get stuck on an open- ing Flash page and can’t move forward until the Flash has finished executing. If the user is in a hurry, it’s a frustrating thing to deal with.
Flash is also a nightmare when it comes to SEO. A Flash page can stop a web crawler in its tracks, and once stopped, the crawler won’t resume indexing the site. Instead, it will simply move on to the next web site on its list.
The easiest way to overcome Flash problems is simply not use it. But despite the difficulties with search rankings, some organizations need to use Flash. If yours is one of them, the Flash can be coded in HTML and an option can be added to test for the ability to see Flash before the Flash is executed. However, there’s some debate over whether or not this is an “acceptable” SEO practice, so before you implement this type of strategy in an effort to improve your SEO effectiveness, take the time to research the method.
Dynamic ASP
Most of the sites you’ll encounter on the Web are static web pages. These sites don’t change beyond the regular updates by a webmaster. On the other hand, dynamic web pages are web pages that are created on the fly according to preferences that users specify in a form or menu. The sites can be created. using a variety of different programming technologies including dynamic ASP The problem with these
sites is that they don’t technically exist until the user creates them. Because a web crawler can’t make the selections that “build” these pages, most dynamic web pages aren’t indexed in search engines.
There are ways around this, however. Dynamic URLs can be converted to static URLS with the right coding. It’s also possible to use paid inclusion services to index dynamic pages down to a predefined number of levels (or number of selections, if you’re considering the site from the user’s point of view).
Dynamic ASP, like many of the other languages used to create web sites, carries with it a unique set of characteristics. But that doesn’t mean SEO is impossible for those pages. It does mean that the approach used for the SEO of static pages needs to be modified. It’s an easy enough task, and a quick search of the Internet will almost always provide the programming code you need to achieve SEO.
PHP
Search engine crawlers being what they are- preprogrammed applications- there’s a limit to what they can index. PHP is another of those programming languages that falls outside the boundaries of normal web-site coding. Search engine crawlers see PHP as another obstacle if it’s not properly executed.
Properly executed means that PHP needs to be used with search engines in mind. For example, PHP naturally stops or slows search engine crawlers. But with some attention and a solid under- standing of PHP and SEO, it’s possible to code pages that work, even in PHP.
One thing that works well with PHP is designing the code to look like HTML. It requires an expe- rienced code jockey, but it can be done. And once the code has been disguised, the PHP site can be crawled and indexed so that it’s returned in search results.