A vital element for a highly optimized website is its sitemap. Serving as a guide, a sitemap leads search engines to all the important pages on your site. In the case of WordPress, the easiest approach to creating and organizing your sitemap is through the use of the Yoast SEO plugin.
In this tutorial, we will guide you on how to edit your XML sitemap in Yoast.
Step 1: Install Yoast SEO Plugin
The first step is to install the Yoast SEO plugin if you haven’t done so already. You can download it from the WordPress plugin repository or directly from your WordPress dashboard under Plugins > Add New, then search for “Yoast SEO.”
Step 2: Enable XML Sitemap Functionality
By default, Yoast SEO automatically creates XML sitemaps for your website. To ensure this feature is enabled, navigate to SEO > General > Features. Ensure the ‘XML sitemaps’ option is switched on.
Step 3: Customize Your XML Sitemap
Yoast SEO allows you to decide what content should be included in your sitemap. You can customize your XML sitemap by navigating to SEO > Search Appearance.
Here you can choose whether to include or exclude different types of content, such as posts, pages, categories, and media. Simply toggle the ‘Show in search results’ option.
For example, to exclude a post type like ‘Pages’ from your sitemap:
Go to SEO > Search Appearance > Content Types > Pages
Then set ‘Show in search results’ to ‘No’.
Step 4: Exclude Individual Posts or Pages
Yoast SEO also allows you to exclude individual posts or pages from your sitemap. To do this:
Edit the post or page you want to exclude, scroll down to the Yoast SEO meta box, click on the ‘Advanced’ tab, and set ‘Allow search engines to show this Page in search results?’ to ‘No’.
Step 5: Check Your XML Sitemap
After making all your changes, it’s essential to check your XML sitemap and ensure everything looks as expected. To view your sitemap, go to yourdomain.com/sitemap_index.xml.
Remember, a well-configured XML sitemap can significantly enhance your website’s SEO by making it easier for search engines to crawl and index your content. With Yoast SEO, optimizing your sitemap is a breeze.
We hope this guide has helped you understand how to edit an XML sitemap in Yoast. Happy editing!