Logo

dev-resources.site

for different kinds of informations.

SEO Optimization Checklist for Coding Your Website

Published at
1/11/2025
Categories
seo
frontend
webdev
performance
Author
wtshek
Categories
4 categories in total
seo
open
frontend
open
webdev
open
performance
open
Author
6 person written this
wtshek
open
SEO Optimization Checklist for Coding Your Website

SEO is important for a websites. To improve SEO, not only do we need excellent content, but also we need to provide good user experience and allow the search engine to understand our website easily. Here is the checklist for coding a SEO optimised website

TLDR:

  • Is your website structure simple and flat?
  • Have you included correct meta tag?
  • Did you create a XML sitemap?
  • Did you create a the robot.txt file?
  • Did you add hreflang and canonical information?
  • Did you create schema markup?
  • Did you code your image tag properly?
  • How is your core web vitals?

Is your website structure simple and flat?

When building your website, it is ideal to have a clear picture of how your website structures. Using a flat structure is beneficial to SEO and user experience in many folds.

It is easier to crawl by the search engines, provides stronger link equity and user can find the web pages faster because they are closer to the homepage.

flat structure vs complex structure

Planning ahead can also avoid orphan page which is not linked by any other page.

Have you use the correct meta tag?

What is meta tag?
Meta tag is a piece of code place in the <head></head> that provide search engine informations about your web page

Some common meta tags

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"> <!-- Specifies the character encoding for the document -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Ensures responsive design on mobile -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Improves compatibility with Internet Explorer -->

    <!-- SEO Meta Tags -->
    <meta name="description" content="A detailed guide on the best travel destinations and tips."> <!-- Page description -->
    <meta name="keywords" content="travel, destinations, tips, blog"> <!-- Keywords for search engines (less relevant now) -->
    <meta name="author" content="Your Name"> <!-- Author of the webpage -->

    <!-- Social Media Meta Tags (Open Graph Protocol) -->
    <meta property="og:title" content="Best Travel Blog - Explore Destinations">
    <meta property="og:description" content="Discover the best travel tips and top destinations.">
    <meta property="og:image" content="https://example.com/image.jpg"> <!-- Thumbnail image for sharing -->
    <meta property="og:url" content="https://example.com/travel-blog">
    <meta property="og:type" content="website">
    <title>Best Travel Blog</title>
</head>
<body>
    <h1>Welcome to the Best Travel Blog</h1>
</body>
</html>
Enter fullscreen mode Exit fullscreen mode

Did you create a XML sitemap?

Sitemap can be defferentiate into 2 types, one is in XML format which allows search engine to crawl your website more easily.

Example XML Sitemap:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <url>
        <loc>https://example.com/</loc>
        <lastmod>2025-01-10</lastmod>
        <changefreq>daily</changefreq>
        <priority>1.0</priority>
    </url>
    <url>
        <loc>https://example.com/about</loc>
        <lastmod>2025-01-08</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.8</priority>
    </url>
</urlset>
Enter fullscreen mode Exit fullscreen mode

Another is in human readable form that users can understand and navigate your website more fast and easy. Normally footer can serve the same function

Example:

sitemap example

Did you create a the robot.txt file?

Robots.txt is a plain text file that is placed on the root directory of your website. It provides instructions to the search engine on how to crawl your website.

It specifies which part of your website/ resources should or should not be crawled.

Example of robot.txt

# Block all crawlers from accessing the admin area
User-agent: *
Disallow: /admin/

# Allow Googlebot to access the entire site
User-agent: Googlebot
Disallow:

# Prevent all crawlers from accessing specific files
User-agent: *
Disallow: /private-info.html
Disallow: /temp/

# Provide a link to the sitemap
Sitemap: https://example.com/sitemap.xml

Enter fullscreen mode Exit fullscreen mode

Did you add hreflang and canonical information ?

If your site is multilingual, it is best to add hreflang and canonical tags, so that search engine would know these pages with similar content are variants.

Example:

<link rel="canonical" href="https://example.com/" />
<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
<link rel="alternate" hreflang="en-ca" href="https://example.com/ca/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

Enter fullscreen mode Exit fullscreen mode

Did you create schema markup?

Schema markup, also known as structured data, is a piece of code that you added to your HTML files to help search engine understand your content.

Remeber the recipes or product carousel on the top or right of Google search result you see when you’re searching? This is generated from the schema markup.

There are various type of markup, like product markup, article markup or orgnisation markup.

Here is an example of product markup:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Smartphone XYZ",
  "image": "https://example.com/product-image.jpg",
  "description": "A high-performance smartphone with 128GB storage.",
  "brand": {
    "@type": "Brand",
    "name": "TechBrand"
  },
  "offers": {
    "@type": "Offer",
    "priceCurrency": "USD",
    "price": "499.99",
    "itemCondition": "https://schema.org/NewCondition",
    "availability": "https://schema.org/InStock",
    "url": "https://example.com/smartphone-xyz/"
  }
}
</script>

Enter fullscreen mode Exit fullscreen mode

Did you code your image tag properly?

When it comes to the image, there is a lot to talk about. We focus the performance aspect in the next section. Here we look at the tag itself.

Here is the most basic img tag should look like

# include alt, width and height
<img src="example.jpg" alt="An example image" width="600" height="400">

Enter fullscreen mode Exit fullscreen mode

You should use proper rel attribute if necessary

rel values usage
noopener used when linking to external sites to improve security and privacy
noreferrer sed when linking to external sites to improve security and privacy
nofollow tell search engines not to follow the link for SEO purposes, preventing the passing of link equity
sponsored indicates that a link is paid or sponsored

How is your core web vitals?

Website performance is one of the core metrics for ranking. Google search engine uses Core Web Vitals (CWV) to measure how fast and how good your website user experience are. It consists of 3 metrics LCP, INP and CLS

Here is the standard suggested by Google

core web vitals standard

To measure your Core Web Vitals score, you can use Lighthouse built in the Chrom Devtools and PageSpeed Insight provided by Google.

To improve your score, here are some techniques you can consider:

  1. Minify CSS, Javascript
  2. Rendering image with the correct size
  3. Use webp format for image
  4. Preloading critique assets
  5. Lazyloading when possible
  6. Use CDN, cache

Above are some of the things to consider when building a SEO optimised. If there is anything missed, comment down belows!

seo Article's
30 articles in total
Favicon
Easy 301 Redirects For SEO
Favicon
Schema Markup can boost your click-through rates by up to 30%?
Favicon
The Surprising Truth About Local SEO for Attorneys in 2025: Why They Are Rethinking Their Strategy
Favicon
How are LLMs Transforming Search Algorithms, and How Can You Adapt Your SEO Strategy?
Favicon
Adding structured data with Perl
Favicon
Why Different Sites Show Different Backlink Numbers: A Comprehensive Explanation
Favicon
How to Perform a Comprehensive SEO Audit
Favicon
How to Use Google Search Console: A Comprehensive Guide
Favicon
Page can't be indexed in Google Search Console
Favicon
The Importance of Choosing the Right Digital Marketing Services Providers
Favicon
10 Best Platforms to Launch Your Developer Tool
Favicon
Enhancing SaaS Product Development with Technical SEO Best Practices
Favicon
Unlocking the Power of On-Page SEO: 5 Game-Changing Tactics to Skyrocket Your Visibility
Favicon
Integrating Web Analytics for Smarter, Data-Driven Decisions
Favicon
Boost Your Business with Cutting-Edge Digital Advertising Services in Rishikesh
Favicon
Beginner SEO Guide: A Step-by-Step Journey to SEO Success
Favicon
7 Common Web Development Mistakes That Hurt SEO
Favicon
How to Optimize Your Website's SEO Content for AI
Favicon
The Ultimate Guide to Accelerated Mobile Pages: How AMP Improves Mobile and SEO Performance
Favicon
Mastering Keyword Research: How to Tailor Your Content for Search Engines and Boost Rankings
Favicon
Unlock the True Potential of Your Content: CMS Optimization Tips for SEO Success
Favicon
OpenGraph Protocol Explained: Optimize Your Website for Better Social Sharing
Favicon
SEO Optimization Checklist for Coding Your Website
Favicon
Will Your Marketing Email End Up in Spam? We Built a Tool to Find Out
Favicon
BrightEdge SEO Platform: A Comprehensive Guide for Digital Marketers
Favicon
How SEO AI Can Supercharge Your Content Marketing ROI
Favicon
Real Estate Websites: Designing Features That Sell Homes and Build Trust
Favicon
Can You Serve Only Data to AI Crawlers?
Favicon
Best Digital Marketing Company in Thrissur
Favicon
How to find the best freelancer SEO

Featured ones: