Sometimes you want a page live on your store but not listed in your visible HTML sitemap, for example a private policy page or a duplicate landing page. You can do this with a simple metafield in your Shopify admin. It only takes two steps.
Step 1: Create the metafield definition
In your Shopify admin, go to Settings > Metafields and metaobjects.
Select Pages, then click Add definition.
Under Name, enter Excluded from Sitemap.
Under Type, select True or false.
Click Save.
Please note that the metafield has to be exactly custom.excluded_from_sitemap like in the screenshot below.
You only need to do this once. After the definition exists, it will show up automatically on every page in your store.
Step 2: Apply it to a specific page
Go to Online Store > Pages and open the page you want to hide from the sitemap.
Scroll down to the Metafields section.
Find Excluded from Sitemap and select True.
Click Save.
Repeat this step for any other page you want to exclude. Pages set to False, or pages where the metafield was never touched, will still appear in the sitemap as normal.
Other ways to exclude items
Products: add the tag sitemap_skip to a product to leave it out of the HTML sitemap.
Collections: collections you hide in TinySEO under Improve SEO > "Hide pages from search engines and sitemaps" are left out of the HTML sitemap.
Whole sections: in the HTML sitemap settings, untick Products, Collections, Pages, Blogs or Articles under "Sitemap categories" to remove that section.
Notes
This only affects the HTML sitemap. It does not remove the page from your store or from search engines.
Changes can take a few minutes to reflect on your storefront.


