Published on October 15, 2025
In this tutorial I will show you how to add sitemap to GitHub pages, which can improve your site indexing and optimize sitemap for SEO.
1: Create a file name callled sitemap.xml in your Github repository and insert the code below.
<?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://www.sitewebdevelopment.com/index.html</loc>
<lastmod>2025-11-07T07:25:37+00:00</lastmod>
<priority>1.00</priority>
</url>
</urlset>
You can repeat the url below for every page you add to the repository by changing the .html file.
<urlset>
<url>
<loc>https://www.sitewebdevelopment.com/index.html</loc>
<lastmod>2025-11-07T07:25:37+00:00</lastmod>
<priority>1.00</priority>
</url>
</urlset>
Note: You can also add image-sitemap.xml and video-sitemap.xml to the repository.
For more information you can visit below link.