Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. Home
    2. SEO Tactics
    3. Technical SEO
    4. Exclude Child URLs from XML Sitemap Generator (Wordpress)

    Moz Q&A is closed.

    After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

    Exclude Child URLs from XML Sitemap Generator (Wordpress)

    Technical SEO
    2
    7
    3830
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • markadoi84
      markadoi84 last edited by

      Hi all,

      I was recommended the XML Sitemap Generator for Wordpress by the very helpful Keith Bloemendaal and John Pring - however I can't seem to exclude child URLs.

      There is a section Exclude items  and a subsection Exclude posts.  I have tried inputting the URLs for the pages I don't want in the sitemap, however that didn't work.  So I read that you have to include a list of "IDs" - not sure where on earth to find that info, tried the page name and the post= number from the URL, however neither worked.

      I hope somebody can point me in the right direction - and apologies, I am a Wordpress novice, and I got no answers from the Wordpress forums so turned right back to SEOmoz!

      Cheers.

      1 Reply Last reply Reply Quote 0
      • markadoi84
        markadoi84 @markadoi84 last edited by

        AH!  You did it Keith - I thought clicking 'update' at the bottom would do it, but there's a little link hidden in some text at the top saying "rebuild the sitemap manually".

        Finally it's done, thanks so much for your help!

        Mark

        1 Reply Last reply Reply Quote 1
        • kbloemendaal
          kbloemendaal @markadoi84 last edited by

          Did you try to generate a new sitemap after clicking update options and then submitting it to webmaster tools?

          Generally it will only update when you add/delete pages on it's own.

          1 Reply Last reply Reply Quote 1
          • markadoi84
            markadoi84 @markadoi84 last edited by

            I'm just trying to exclude these child URLs from the sitemap - in future I may block them entirely, but I certainly don't want to submit a sitemap with these URLs and then contradict that in robots.txt.

            I have used the Post ID numbers to exclude the pages from the sitemap, however they remain in place.

            Thanks once again for your assistance and quick responses!

            1 Reply Last reply Reply Quote 0
            • kbloemendaal
              kbloemendaal @markadoi84 last edited by

              It may take some time for it to propagate to Google if that is what you are asking. Are you trying to block the pages/posts completely from search engines?

              1 Reply Last reply Reply Quote 1
              • markadoi84
                markadoi84 @kbloemendaal last edited by

                Hi Keith,

                Thanks once again for a quick response.  I have actually tried that method, however when I check the live sitemap I can still see the pages in my sitemap.  Very frustrating!  Is it that the sitemap doesn't update live straight away?  And just to confirm, I am clicking "Update Options" at the bottom - quite often it'll be something stupid like that! 😉

                Thanks,

                Mark

                kbloemendaal markadoi84 4 Replies Last reply Reply Quote 0
                • kbloemendaal
                  kbloemendaal last edited by

                  Great question, and WP really should make this easier!

                  http://businessaccent.com/2009/06/08/what-is-my-wordpress-post-id-number-and-how-can-i-find-it/  This article explains one way to see it, also if you open up the post/page in the admin panel to edit it you can just look in your browser to see the url which will have the post ID in it... IE: www.yoursite.com/wp-admin/post.php?post=615&action=edit (615 is the post ID)

                  Hope that helped 🙂

                  markadoi84 1 Reply Last reply Reply Quote 1
                  • 1 / 1
                  • First post
                    Last post

                  Got a burning SEO question?

                  Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                  Start my free trial


                  Browse Questions

                  Explore more categories

                  • Moz Tools

                    Chat with the community about the Moz tools.

                  • SEO Tactics

                    Discuss the SEO process with fellow marketers

                  • Community

                    Discuss industry events, jobs, and news!

                  • Digital Marketing

                    Chat about tactics outside of SEO

                  • Research & Trends

                    Dive into research and trends in the search industry.

                  • Support

                    Connect on product support and feature requests.

                  • See all categories

                  Related Questions

                  • Hasanovic

                    Google Not Indexing Pages (Wordpress)

                    google search console indexed urls indexation

                    Hello, recently I started noticing that google is not indexing our new pages or our new blog posts. We are simply getting a "Discovered - Currently Not Indexed" message on all new pages. When I click "Request Indexing" is takes a few days, but eventually it does get indexed and is on Google. This is very strange, as our website has been around since the late 90's and the quality of the new content is neither duplicate nor "low quality". We started noticing this happening around February. We also do not have many pages - maybe 500 maximum? I have looked at all the obvious answers (allowing for indexing, etc.), but just can't seem to pinpoint a reason why. Has anyone had this happen recently? It is getting very annoying having to manually go in and request indexing for every page and makes me think there may be some underlying issues with the website that should be fixed.

                    Technical SEO | | Hasanovic
                    1
                  • Easigrass

                    Should I use a canonical URL for images uploaded to a blog post in Wordpress?

                    Hi, I have a wordpress website that has articles/news posts witch contain imagery. I've noticed that in the Media Library, when you upload an image to a blog post it generates a new permalink ...article-name/article-image-01.jpg I have Yoast SEO plugin and have the option to set a canonical URL for this image. Should I point it back to the actual article? Thanks for any helpers with this.

                    Technical SEO | | Easigrass
                    0
                  • HeroDesignStudio

                    301 Redirects, Sitemaps and Indexing - How to hide redirected urls from search engines?

                    We have several pages in our site like this one, http://www.spectralink.com/solutions, which redirect to deeper page, http://www.spectralink.com/solutions/work-smarter-not-harder. Both urls are listed in the sitemap and both pages are being indexed. Should we remove those redirecting pages from the site map? Should we prevent the redirecting url from being indexed? If so, what's the best way to do that?

                    Technical SEO | | HeroDesignStudio
                    0
                  • mattdinbrooklyn

                    Automate XML Sitemaps

                    Quick question, which is the best method that people have for automating sitemaps. We publish around 200 times a day and I would like to make sure as soon as we publish it gets updated in the site map. What is the best method of updating a sitemap so it gets updated immediately after it is published.

                    Technical SEO | | mattdinbrooklyn
                    0
                  • BarcelonaExperience

                    Is it Detrimental to Repeat a Word in Our URL?

                    Hey guys! We run a tour company in Barcelona. Our company name is Barcelona Experience. We're customizing our URL's to include keywords which can be found in all the important areas on the page (title tage, meta descp., etc).
                    We want to change "www.barcelonaexperience.com/bike-tours" to "www.barcelonaexperience.com/barcelona-bike-tours"
                    We're worried the repetition of "barcelona" could be a bad thing. True, or not true? Thanks!

                    Technical SEO | | BarcelonaExperience
                    0
                  • JimDirectMailCoach

                    When creating parent and child pages should key words be repeated in url and page title?

                    We are in the direct mail advertising business:  PrintLabelAndMail.com Example: Parent:
                    Postcard Direct Mail Children:
                    Postcard Mailings
                    Postcard Design
                    Postcard Samples
                    Postcard Pricing
                    Postcard Advantages should "postcard" be repeated in the URL and Page Title? and in this example should each of the 5 children link back directly to the parent or would it be better to "daisy chain" them using each as parent for the next?

                    Technical SEO | | JimDirectMailCoach
                    0
                  • ufmedia

                    Authorship and Publisher on WordPress

                    I successfully enabled rel=publisher on our WordPress blog, and as a test I also enabled rel=authorship for a set of blog posts.  (Tested both in Google's Rich Snippets Tester.)  However, on the individual blog posts the publisher credit disappears.  Is there a way to enable both to appear on blog posts?

                    Technical SEO | | ufmedia
                    0
                  • kevin4803

                    Best XML Sitemap generator

                    Do you guys have any suggestions  on  a good XML Sitemaps generator? hopefully free, but if it's good i'd consider paying I am using a MAC so would prefer  a online or mac version

                    Technical SEO | | kevin4803
                    0

                  Get started with Moz Pro!

                  Unlock the power of advanced SEO tools and data-driven insights.

                  Start my free trial
                  Products
                  • Moz Pro
                  • Moz Local
                  • Moz API
                  • Moz Data
                  • STAT
                  • Product Updates
                  Moz Solutions
                  • SMB Solutions
                  • Agency Solutions
                  • Enterprise Solutions
                  Free SEO Tools
                  • Domain Authority Checker
                  • Link Explorer
                  • Keyword Explorer
                  • Competitive Research
                  • Brand Authority Checker
                  • MozBar Extension
                  • MozCast
                  Resources
                  • Blog
                  • SEO Learning Center
                  • Help Hub
                  • Beginner's Guide to SEO
                  • How-to Guides
                  • Moz Academy
                  • API Docs
                  About Moz
                  • About
                  • Team
                  • Careers
                  • Contact
                  Why Moz
                  • Case Studies
                  • Testimonials
                  Get Involved
                  • Become an Affiliate
                  • MozCon
                  • Webinars
                  • Practical Marketer Series
                  • MozPod
                  Connect with us

                  Contact the Help team

                  Join our newsletter
                  Moz logo
                  © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                  • Accessibility
                  • Terms of Use
                  • Privacy

                  Looks like your connection to Moz was lost, please wait while we try to reconnect.