When most people think of Search Engine Optimisation (SEO), they imagine pages and pages of content, keywords, link building and all sorts of other, sometimes mysterious practices. There is however a lot more to SEO than just the content. A lot of work needs to go on behind the scenes in the code of the website to help the search engines pick out your site. Here are some guidelines to what goes on at a developer level to help out the content.
The Basics
Before we even think about optimising the site for search engines we need to make sure they can see it. One of the most common reasons why a site would appear invisible is due to a very small file called robots.txt. This little file tells search engine robots how it should behave when on the site. Are there places it can’t go, which robots are allowed where etc.
Your robots.txt file can be ignored by the robots crawling your site but on the whole if it looks like this then nothing will see your content.
User-agent: * Disallow: /
This on the other hand opens up everything to be crawled:
User-agent: * Disallow:
That one tiny forward slash (/) can make all the difference.
Clean URLs
The URL of the page is one of the most important parts of the page. It is the first thing that search engines see when looking at a page and as a result this is what they use to help determine how a page ranks. Therefore it should be easy to read, descriptive and ideally not have any of the URL parameters some sites use.
http://www.mydomain.com/index.php?category_id=12&produc_id=97
http://www.mydomain.com/t-shirts/mens-red-t-shirt
Which of the two URLs above is the easiest to read and understand? They could both point to the same place but search engines would much prefer the second example as there is more description to pick up on and use when ranking the page.
By default CMS’s most will give you the first example above so careful consideration is needed in setting up the site to show the nicer and cleaner example.
Optimising your URLs
Sticking with the topic of page URLs, they need to be optimised per page to ensure your content gets the ranking it deserves.
- Short and to the point - Make sure your URLs are kept as short as possible to help people remember them (and to avoid waffling) but make sure you describe what the page is about
- Keywords - Describe the page using your keywords e.g. mens-red-t-shirt. Do not just stuff keywords into the URL however. It is vital that the keywords read naturally as a human would read them otherwise you may incur a search engine penalty.
- Only use certain characters - One key point that many people forget is to use hyphens instead of underscores to separate words. Search engines have defaulted to using hyphens as word separators so urls_written_this_way will appear the same as urlswrittenthisway which is no good when you are including keywords, urls-written-this-way are much friendlier.
Redirects
Websites are a living, breathing thing. It is sometimes necessary to move content and pages around if the site is re-designed or products or services are discontinued etc. When doing this you need to be careful not to leave the user hanging if they find a link to that page. There are ways around this and the most common is to redirect the page to something similar on your site or to the new location of the content.
For example if a news article has moved then add a 301 (permanent) redirect to the new location. This method will notify the servers that the content has moved and the old link should slowly fade from existence.
If a product has been removed from sale or discontinued then you may wish to do a redirect to a similar product or to the category that the product was in e.g. the Red T-shirt product from the URLs earlier you may wish to redirect to the t-shirt category where the user can pick from the other similar products.
The exact type and location of the redirect will depend entirely upon the site and the links but keeping the number of 404 errors as close to zero as possible is the key take away here. Search engines tend to see sites with lots of 404’s as unloved and un-maintained.
Schema Markup
Schema is one that many new websites forget or don’t use to its full potential. Schema.org gives developers a vast array of structured data to choose from to help search engines determine what sort of content is on a page and how it should be treated. The simple data for a website would maybe include business details such as the name, address, logo and opening hours but can also range right up to information about the people who work there, the products and a whole host of other information. Do a search in Google for your favourite recipe and you are bound to see a result or two with extra information such as cooking time and number of calories. These pages have been marked up with schema to help bring the important information to the front which in turn allows search engines to display more useful details to the user so they can make a choice from the search engine results without having to click on individual pages.
Giving this information up front and allowing informed choice from the user does mean that your page needs to stand out so the more information you can give and the more your content, meta description and titles are optimised the better chance you have of a user landing on your page as opposed to your competitor.
Mobile devices
At the beginning of 2016, Google released a major update in its search algorithm which introduced a new ranking factor known as “mobile friendliness”. With the growing number of users choosing to browse with mobile phones and tablets, they have placed more emphasis on a clean responsive site that users can access just as well as their desktop counterparts.
For most people this is a case of needing to update their current website to include either a separate mobile site or a responsive version of their current website to suit the needs of a small screen and fingers. This does however need more consideration than just cramming all of the content into a smaller area. Buttons need to be bigger and more spaced out so fingers can only tap one at a time. The menu has to work on a smaller device but not be intrusive and take up screen space. Some elements on a page are more important than others for example your featured products or a signup form, so need moving around to emphasise them.
Page speed
There was a time before broadband where users paid for the amount they downloaded and therefore pages were kept to a minimum size. Then with the advent of broadband and less pay as you go type billing the size of the page gradually got larger and larger. Higher resolution images, more scripts, more adverts etc. No with the increasing use in mobile and tablet usage, we are having to go back to small, fast loading pages due to small processing power on the phone, and the 3G and 4G networks being fast but not always at broadband speeds. This does not mean the page needs to be boring, far from it and technology to serve good quality images regardless of the device has come on leaps and bounds but pages that are considered large are being penalised under the search engine rankings nowadays.
The ways to reduce a page size are numerous and all depend on the page and site that you are optimising but code minification, image optimisation and browser caching are some of the most common. Each one may only save a few kilobytes but they all add up and count for big savings, faster loading times and a better ranking.