DEV Community

Cover image for Day 18 of #100DaysOfCode: Create Sitemap to Improve SEO
Jen-Hsuan Hsieh
Jen-Hsuan Hsieh

Posted on • Edited on

2 1

Day 18 of #100DaysOfCode: Create Sitemap to Improve SEO

Introduction

Sitemap can't really improve SEO for the website. However, it can make sure that search engine includes every pages of the website.

Steps

1. Generate sitemap for the website

The sitemap.xml has to include all pages. We can use sitemap generator to generate sitemap if the website is too large. https://www.xml-sitemaps.com/

  • Put one page's URL one the input box and click start
    Alt Text

  • Then the site generator will scan the website and shows all pages
    Alt Text

  • The following example shows the format of the sitemap

<?xml version="1.0" encoding="UTF-8"?>
<urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
  <loc>https://jenhsuan.github.io/ALayman/profile.html</loc>
  <lastmod>2020-05-09T00:44:26+00:00</lastmod>
  <priority>1.00</priority>
</url>
<url>
  <loc>https://jenhsuan.github.io/ALayman/projects.html</loc>
  <lastmod>2020-05-09T00:44:26+00:00</lastmod>
  <priority>0.80</priority>
</url>
...

</urlset>
Enter fullscreen mode Exit fullscreen mode
  • Put the sitemap.xml in the root folder. Make sure that others can visit sitemap under the domain.

2. Submit the Sitemap to Google Search Console

That's it!

Articles

There are some of my articles. Feel free to check if you like!

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay