How to add sitemap to your site using netlify plugin

You are done building your website, but you need an automatic way of generating sitemap for your website without having to do much work.

Here is a simple guide on how to do just that.

Note.

Your website has to be built with plain old HTML or any SSG (Static Site Generator) such as Hugo, Gatsby, 11ty etc. and also must be uploaded to Netlify.

  1. You need to go to your Netlify dashboard Netlify Dashboard
  2. Click on the Integrations tab netlify integrations tab
  3. On the integration dashboard, click on the search bar and type “sitemap” search for sitemap integration tab
  4. Then, click on enable sitemap plugin on Netlify dashboard
  5. The sitemap plugin prompt “install” will appear install plugin prompt
  6. After clicking the “Install” button, you will be redirected to the dashboard. dashboard after plugin install

    Voilà, you are done! But one last thing to do is for you to clear the cache of your site and redeploy.

  7. You can do this by clicking on the production deploys tab then, you will see a page as below clear cache of site
  8. Click on the trigger deploy dropdown and then click on clear cache. Wait for Netlify to do it’s work and then visit your site URL and apply /sitemap.xml e.g. yoursite.com/sitemap.xml UPDATE your site url sitemap