SEO Guidelines 2021 For Developers

The title of the story might be weird for you specially if you are a developer ! Why a developer will do SEO related works? You don’t need to do all of the stuffs that an SEO expert does! Basically in SEO, we have two parts !
Such as:
1. On Page SEO
2. Off Page SEO

We will talk about On Page SEO today where some technical works are needed to be done. In this case developers are needed. As most of the SEO experts are familiar with WordPress, Shopify, Joomla related CMSs, they find it difficult to do the technical things if the website is developed using different technologies like Laravel, Django and with some front end frameworks like ReactJS, VueJS etc. In WordPress we can easily search for some plugins to do the technical stuffs. But in case of custom web application, SEO experts need developers to do the technical stuffs! But for developers doing the things in the middle of the project which should be done before is tough and problematic too! So it’s better if we (developers) do some work in advance !

Here are the list of things that we should do for On Page SEO.

1. Sitemap i.e. Dynamic Sitemap: Most of us might hear the term “sitemap”. Basically every search engine has some crawling robots which crawls (visit website and its pages and collect data) website. Sitemaps helps search engines to learn about the website and its pages. We can say its the entry point for any crawler to a particular website. Here is an example of sitemap in xml format (yoursite.com/sitemap.xml) where necessary URL’s of different pages are given with some additional information such as Last Modification Time, Changing Frequency and Priority. You can learn more here .

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">   
  <url>   
    <loc>http://www.example.com/</loc>  
    <lastmod>2005-01-01</lastmod>    
    <changefreq>monthly</changefreq>  
    <priority>0.8</priority> 
  </url>
</urlset>

So why I’m saying “Dynamic” . As of my experience, I’ve seen that most of the website has a static sitemap. Basically people use online sitemap generator to generate a fresh sitemap, then manually delete the old sitemap from the server (cpanel filemanager), then upload new sitemap and it continues!
But for a dynamic website you never know when contents will be updated. So there is always a chance that right after uploading sitemaps, a new and important content might have been published ! So as a developer you should make it dynamic. It will save your time as well as up to sitemaps help search engine to get latest data. Here is an article to create dynamic sitemaps in Python’s Django Framework. Read Here. You can create dynamic sitemaps with any languages and frameworks. WordPress has some plugins for that. Yoast SEO automatically generates it. But again custom websites need custom solution.

2. Automatic Sitemap Pinging: If you haven’t added your website on Google Search Console (Previously Google Webmaster Tools), please add here using DNS verification. Okay, let’s come to the main topic. You have generated dynamic sitemap. Now you need to request or tell google to crawl. Basically you are requesting google to look at your sitemap. Well even if you don’t request, google still crawls your websites but requesting always is a good idea because why should google finds you where millions of websites are in the queue if you don’t request or ping ?
Its quite simple, just hit the url
http://www.google.com/ping?sitemap=https://yoursite.com/sitemap.xml

Again its a manual process. So make it dynamic again! You can create a simple php script pingsitemap.php

<?php 
 $url = "http://www.google.com/pingsitemap=https://yoursite.com/sitemap.xml"   
 $response = file_get_contents($url);

 if($response){
 echo $response;
 }else{
 echo “Failed to submit sitemap”;
 }
?>

After creating this script, add this to a cron job! you can run it every 4 hours by setting 0 */4 * * * and the location of the script. In search console you will see the automatic crawling status.

3. Meta Tags and Other Tags: May be all of you have heard that meta tags are important for SEO. Yes meta information are required for any search engine to parse a particular webpage and collect important data. Apart from Meta Tags such as title, description, image, keywords are very important. Make those tags dynamic as well. In laravel you can pass meta information to the header.blade.php in the compact method as an object. In django you can pass meta information in the context of a view to header.html template too as a dictionary. Choice is yours. You can find important tags here.

For Facebook we should use Open Graph Tags. If we use these tags, then facebook will generate a snippet when sharing content on facebook from website. Learn more about og tags here.

<meta property="og:url"content="http://www.nytimes.com/2015/02/19/arts/international/when-great-minds-dont-think-alike.html" />
<meta property="og:type" content="article" />
<meta property="og:title" content="When Great Minds Don’t Think Alike" />
<meta property="og:description" content="How much does culture influence creative thinking?" />
<meta property="og:image"   content="http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg" />

For Twitter We Will Use Twitter Cards Tags! Some of the open graph tags can work too but some are specific to twitter. Have a read here

4. Schema: Before talking about what Schema is, we all have noticed that in search results there are some special way of representing results in different designs. For example:

Image for post

As you can see these results have different design and UI. These are called Snippets ! Search engine produces special snippets on search results using Schema Markup! Basically its a json objects or html tags attributes holding some structural information of a certain webpage. You can read more about scheme here.

<script type="application/ld+json">
{
  "$id": "https://example.com/person.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Person",
  "type": "object",
  "properties": {
    "firstName": {
      "type": "string",
      "description": "The person's first name."
    },
    "lastName": {
      "type": "string",
      "description": "The person's last name."
    },
    "age": {
      "description": "Age in years which must be equal to or greater than zero.",
      "type": "integer",
      "minimum": 0
    }
  }
}
</script>

Again ,you can make it dynamic too. Just display the dynamic json object in the footer section.

5. Image Compression: Site’s load time largely depends the images as in most cases images take a lot of spaces and bandwidths. So its always better to optimize before uploading! Wait ! As a developer you can make it more convenient by making a mechanism where during uploading, an image will be automatically compressed. You should use JPEG format for better result. Read an article on image compression using Python and Django Here.
You can achieve this functionality in any programming languages i.e. using php GD etc.

6. Website Optimization: As a developer/designer you should optimize your website to make it speedy and light weight. You can use GTMATRIX to find important information regarding optimization. Again light weight and speedy websites rank faster on search engines which makes it an important SEO factor too.

7. USE SSL Certificate ,Caching and CDN: You must ensure that the website is having SSL certificate as it is very important aspect of on page seo and is a must.You can get free SSL certificate from Let’s Encrypt or Cloudflare. To speed up the website caching is important as many frontend as well as backend related stuffs that are not changing frequently can be cached. You can use Cloudflare as CDN (Content delevery network) for basic cashing as well as CDN for serving js and css files for free. It will improve your site performance.

So these are the basics steps of on page seo that a developer might do. Feel free to knock me for any kind of help regarding this. Also do clap and share this article with your friends and colleagues.

Written By

Md Mahmudul Huq Topu

Software Developer, Skill Jobs

Image USED

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.