+254725682556 +254725052660 info@ziprof.co.ke
Client Area

SEO

How to Create an XML Sitemap for Your Website

An XML sitemap is a file that lists the pages on your website in a format search engines can read. It helps Google and other search engines discover and index your content faster, especially on newer sites or sites with pages that aren't well linked internally. Before you can submit a sitemap to Google Search Console, you need to create one - here's how.

If Your Website Runs on WordPress

Most WordPress SEO plugins generate and update your sitemap automatically, so you rarely need to build one by hand.

  1. If you use Yoast SEO: go to Yoast SEO in your WordPress dashboard menu, click General, then open the Features tab and make sure XML sitemaps is switched on. Click the question-mark icon next to it to get your sitemap's direct link (usually something like yourdomain.co.ke/sitemap_index.xml).
  2. If you use Rank Math: go to Rank Math, then Sitemap Settings, and confirm sitemaps are enabled. Your sitemap link will be at yourdomain.co.ke/sitemap_index.xml as well.
  3. If you don't use an SEO plugin yet, install one from Plugins > Add New first, then repeat the steps above.

Once enabled, these plugins keep the sitemap updated automatically every time you publish or edit a page or post, so you don't need to regenerate it manually.

If Your Website Isn't Built on WordPress

You have a few practical options depending on how your site was built:

  • Content management systems installed through Softaculous (such as Joomla or PrestaShop) usually have a built-in sitemap generator in their own admin settings or extension marketplace - check the site's SEO or extensions menu first.
  • Static or custom-coded websites can use a free online XML sitemap generator: enter your website's address, let it crawl your pages, and download the resulting sitemap.xml file.
  • For a small site with only a handful of pages, you can write the sitemap.xml file by hand following the standard XML sitemap format, though a generator is faster and less error-prone.

Uploading the Sitemap File to Your Website

However you create it, the file needs to sit in your website's root directory so it's reachable at yourdomain.co.ke/sitemap.xml.

  1. Log in to your hosting control panel and open File Manager.
  2. Navigate to your website's root folder (usually public_html, or the domain's specific folder if it's an addon domain).
  3. Click Upload and select your sitemap.xml file.
  4. Once uploaded, visit yourdomain.co.ke/sitemap.xml in your browser to confirm it loads correctly.
If you later add or remove pages on a non-WordPress site, you'll need to regenerate and re-upload the sitemap manually, since it won't update itself the way a WordPress plugin's sitemap does.

Next Step: Submit It to Google

Once your sitemap is live at its URL, you're ready to tell Google about it. See how to submit your sitemap to Google Search Console for the next step.