Too many webmasters think of SEO in terms of things you do after a website is created, whether thatâ€™s optimizing specific on-page variables in order to maximize the odds of being ranked for particular keywords or the process of soliciting backlinks from qualified sources to power off-page SEO.
However, ignoring the important role that your siteâ€™s coding can play in its overall optimization is essentially the same as building your home on an unstable foundation.Â Consider all of the following ways that coding can help your siteâ€™s SEO in order to avoid missing out on these critical benefits.
Tip #1 â€“ Validate your code for search engine spider accessibility.
Keep in mind that the search engine spider programs have some serious limitations when it comes to crawling and indexing your site.Â Since they really only read text effectively, other elements on your site, including image, audio, video, and script files, can all prevent important site text from being crawled and indexed appropriately.
To see for yourself exactly how the search engines interpret your pages, use the Webconfs â€œSearch Engine Spider Simulatorâ€ tool to review your website.Â If you notice that chunks of text are missing from your pages, validate your code correctly so that the search engines are able to find your information.
Tip #2 â€“ Use coding to create SEF URL rewrites.
Creating search engine friendly (SEF) URLs is beneficial from both an SEO perspective and in terms of the user experience.Â The specific way youâ€™ll need to modify your siteâ€™s code in order to minimize the number of extraneous characters and codes that are present in your URL will depend on the specific platform your site runs on.Â If you use WordPress, Joomla, or any other CMS, you should have access to plugins or internal dashboard settings that will allow you to make the necessary changes.Â In some other cases, particularly when it comes to open source ecommerce platforms, you may need to address your permalink structure within your .htaccess file.
Tip #3 â€“ Clean your code to facilitate site speed improvements.
Although your siteâ€™s code might start out â€œclean,â€ over time, itâ€™s common for website modifications to result in a number of different errors that can slow down your siteâ€™s operation.Â For this reason, itâ€™s a good idea to perform regular checks that account for all of the following issues:
- Eliminate excess whitespace, while still keeping your code readable
- Use an HTML validator to eliminate broken and unpaired tags
- Use a broken link checker tool to remove invalid URLs
Tip #4 â€“ Serve text-based alternative to on-page scripts.
As mentioned in Tip #1, the search engines canâ€™t usually access information thatâ€™s contained within image, video, or script files.Â However, as these elements can go a long way towards improving the user experience on your site, it isnâ€™t a good idea to eliminate them entirely.
Instead, a better alternative from a coding perspective is to serve up alternate, text-based versions of the information youâ€™d like the search engines to index.Â As an example, when serving up Flash files, consider using the SWFObject2 library, which will automatically deploy alternate text-based content whenever it detects users or search engine spiders that canâ€™t process these file types correctly.
Tip #5 â€“ Set up â€œnoindexâ€ tags on your robots.txt file.
While thereâ€™s no way to control the behavior of the search engine spiders with 100% accuracy, telling them not to index certain pages on your site through the use of â€œnoindexâ€ tags on your robots.txt file can be useful from an SEO perspective.Â This tag should be added to your robots.txt file for any pages that shouldnâ€™t appear in the search results, including:
- Shopping cart and checkout pages
- User dashboard pages
- Archive pages
- Contact pages
Tip #6 â€“ Use â€œrel=canonicalâ€ to deal with duplicate content issues.
If you use a CMS program like WordPress, Magento, or Joomla to build your site, chances are youâ€™ve got duplicate content issues that result from the way these platforms create URLs.Â Whenever you add a new post to your website, itâ€™s not uncommon for these systems to automatically generate any or all of the following options:
Because all of these different URLs redirect to the same page, you risk being subjected to duplicate content filters within the search engines if you donâ€™t specify exactly how each of these URL variations should be treated.
The best way to instruct the search engines on how to handle your URLs is through the use of the â€œrel=canonicalâ€ tag.Â This feature can be added to the head section of your website either by hand or through the use of a plugin and tells the search engines to disregard, redirect, or index a given page for the specified URL.
Tip #7 â€“ Set up 301 redirects to ensure proper PageRank flow.
When it comes to setting up proper 301 redirects, there are two coding situations youâ€™ll want to consider from an SEO perspective.Â First, use this code to inform the search engines that both www and non-www versions of your URLs should be treated the same.
Second, if you ever move content within your site (for example, if you change the title and permalink of a blog article), create a 301 redirect to inform the search engine spiders of the move.Â Doing so will minimize the potential loss of PageRank that can occur when backlinks no longer resolve to your former URLs.
Tip #8 â€“ Use microdata to create rich snippets.
One recent addition to the SEO developerâ€™s toolbox is microdata, a new language that allows you to add several levels of clarifying data to your siteâ€™s HTML tags.Â Not only can these elements help your site to be indexed and ranked correctly, they can also boost your clickthrough rates from the SERPs through the creation of enhanced search result listings known as â€œrich snippets.â€
As thereâ€™s some speculation that overall clickthrough rates from the Google SERPs are being weighted as a ranking factor, adding these new features may help a siteâ€™s SEO in addition to driving extra traffic from the search results.
For more information on what rich snippets are and how to create them through the use of microdata, check out Schema.org.
Tip #9 â€“ Combine script files to speed up load times.
Recently, site loading speed has gained significant importance as a search engine ranking factor, based on Googleâ€™s stated desire to reward fast sites in the search results.
Unfortunately, if youâ€™ve built out your site using tons of different scripts in order to provide additional functionality for your visitors, loading all of these various code files at once can bring down your siteâ€™s performance substantially.Â By combining these individual code sheets into a smaller number of files, youâ€™ll minimize the long load times caused by excess script demands and improve your siteâ€™s overall SEO.
Tip #10 â€“ Utilize CDNs to minimize necessary launch resources.
Finally, if youâ€™ve made all of the possible modifications to your websiteâ€™s code, and you still havenâ€™t been able to achieve measurable improvements in your siteâ€™s load times, consider utilizing a content delivery network (CDN) to serve up content from external websites in order to minimize the total resources needed to launch your site.
CDNs like Amazonâ€™s popular S3 service or RackSpace are an especially good idea if you host a large number of images, audio files, or video files on your site.Â If you feel that excess file demands may be dragging down your launch times, look into serving up remote content via CDN services.Â Theyâ€™re often quite cost-effective to use, and they can make a big difference in terms of your siteâ€™s overall SEO.
Article source: http://www.searchenginejournal.com/10-ways-coding-can-help-your-seo/45402/