With most sites, there are always some pages that you need to hide from your visitors.
This tutorial will show you how to stop those pages from showing up in the XML Site-map.
To walk you through the process, I have created a page titled Hide This Page, the page has the ID number of 64 and as you can see in the image below it is listed almost at the very top of my Sitemap.
Your page ID is the number associated to the post or page, not the page title.

Firstly, you need the Google XML Sitemaps plugin set up and activated, and I also recommend the Reveal IDs for WP Admin plugin.
When you first set up your Sitemap, you would of noticed a section in the configuration page called Excluded items, Inside of the Exclude Items section is a text area titled Exclude Posts, this is where you need to insert the ID of the pages you want to hide.

The easiest way to find your page or post ID, is to use the plugin I referred to at the start of the post, which is the Reveal ID’s For WP Admin.
After you have installed, activated and set up your plugins, Go to the edit Posts or Pages screen.
You can find the link to edit your Posts and Pages in the sidebar, for this example I am going to hide a Page, but this same method also works for hiding Posts.

If you have the Reveal ID’s For WP Admin plugin set up and activated, you will see the list of page ID numbers in a single column to the right of screen.

If you don’t have the Reveal ID’s For WP Admin plugin installed, another way to find the page ID is to hover over the page title, and in the footer of your browser is the page ID at the end of the URL for the specific page.

Find the ID number of the specific page/pages you want to hide.
Go back to your Site-map configuration page and insert the page ID’s inside of the Exclude Posts section.

After inserting the page ID followed by a comma, scroll to the bottom of the page and save your changes by clicking on the Update Options button.
Once you have saved your preferences you will need to rebuild your Site-map.
To rebuild the site-map click on the link with the text rebuild the sitemap, at the top of your site-map configuration page.

After saving your changes and rebuilding your site-map, go to your site-map page to confirm that the page has been removed.
Your Site-map can be found by clicking on the link at the top of your configuration page.

Or, by typing into your browsers address bar www.your-domain-name.com/sitemap.xml
Refresh your page to see the changes, you may need to clear your cache or simply open the web page in a new browser.
If all goes well your page should now be hidden from your XML sitemap.
Popularity: 8% [?]
Thank you, thank you, thank you
Your Welcome.