An XML Sitemap lets you share data about the pages on your website with search engines. By doing so, search engines gain deeper understanding of which pages exist on your website. This is especially important for larger websites where it is more likely search engines will be unable to crawl to every page on your website.
There are also specific sitemap formats for news, images, and videos. These can be especially helpful if your website relies heavily on that type of content. For example, if you regularly share videos on your website, having a video XML sitemap can make it easier for search engines to index those videos.
As well, if you have a mobile specific version of your website, you can create an XML sitemap specifically listing the pages you intend a mobile audience to view. This can make it easier for search engines to find the right pages to show in mobile search results.
When building your XML sitemap, be sure to exclude problematic pages such as broken URLs, URLs containing low-quality content, or blocked URLs. In addition to creating mixed signals about those URLs, this also diminishes the overall quality of the XML sitemap reducing the chances of search engines relying on your XML sitemap.
Creating an XML sitemap is relatively straightforward and the protocol is fairly simple if you need to create an XML sitemap manually. There are also XML generation tools (http://www.xml-sitemaps.com/) that can automatically create your sitemap. As well, many plugins exist that allow you to create XML sitemaps dynamically, including the Yoast SEO plugin for WordPress (https://yoast.com/wordpress/plugins/seo/).
After creating the XML sitemap, you want to tell Google and Bing about your new sitemap. The easiest way is to submit your XML sitemap directly to Google and Bing via Google Search Console and Bing Webmaster Tools.
In Google Search Console, click on Crawl, then click on Sitemap.
From here, you can click on "Add/Test Sitemap", enter the URL to your XML sitemap, then click "Submit Sitemap." Following this, Google will begin reviewing your XML sitemap. You can check back to this same page later to see if Google has detected any errors with your XML sitemap.
In Bing Webmaster Tools, navigate to Configure My Site, then click on Sitemaps.
After arriving here, enter in your XML sitemap URL, then click submit. Bing will then crawl through your XML sitemap. You can check back to this same page later to see if Bing has detected any errors with your XML sitemap.
Another way is to list the XML sitemap on your robots.txt file. This is especially helpful for when your XML sitemap is not available at the standard "domain.com/sitemap.xml" URL or when you are unable to submit the sitemap to Google Search Console or Bing Webmaster Tools.