Overview

Sifting through sitemap.xml files manually to gather all page URLs is tedious and error-prone. This workflow automates the extraction process by detecting sitemap indexes or direct URL lists, fetching sub-sitemaps when needed, and deduplicating URLs. It outputs a clean, comprehensive URL list ready for SEO auditing, crawler seeding, or content migration prep.

The Impact

  • Extract Complete URL Sets. Automatically retrieve every page URL from complex sitemap structures.
  • Eliminate Duplicates. Deliver a clean list by removing redundant URLs while preserving order.
  • Save Manual Hours. Remove the need for hand-maintaining or crawling sitemap indexes and sub-sitemaps.
  • Provide Actionable Stats. Output total URLs, duplicates removed, and sitemap counts for analysis.

Who This Is For

  • SEO Specialists preparing comprehensive URL lists for site audits and crawler inputs.
  • Developers automating seed URL generation for web crawlers and bots.
  • Content Teams compiling exhaustive page inventories for migration or backup checklists.
  • Data Researchers scraping full site URL datasets from sitemaps efficiently.

How It Works

1
  1. Fetch Main Sitemap
  2. Request sitemap.xml from the domain root to get the main sitemap content.
2
  1. Parse and Identify Sitemap Type
  2. Analyze the XML to determine if it's a sitemap index or a direct URL list, extracting sub-sitemaps or URLs accordingly.
3
  1. Expand Sub-Sitemaps or Process URLs
  2. If an index, loop through each sub-sitemap, fetch and parse URLs; if direct URLs, proceed to processing them.
4
  1. Aggregate and Deduplicate
  2. Combine all collected URLs, remove duplicates preserving order, and compile statistical data.

What You'll Need

Before using this template, make sure you have:

  • The root domain URL of the target website, including protocol and trailing slash (e.g., https://example.com/).
  • Network access to fetch the sitemap.xml files from the target domain.

How to Use

  1. Step 1. Enter Domain
  2. Input the full root domain URL of the website, including protocol and a trailing slash.

  3. Step 2. Run Workflow
  4. Start the automation to fetch and parse the main sitemap.xml automatically.

  5. Step 3. Process Sitemap Type
  6. The workflow detects if it’s a sitemap index or direct URL list and branches accordingly.

  7. Step 4. Expand Sub-Sitemaps if Needed
  8. If a sitemap index, sub-sitemaps are fetched and parsed for URLs; otherwise URLs are processed directly.

  9. Step 5. Verify Results
  10. Check the final aggregated URL list and statistics for completeness and duplicates removed.

FAQs

How does the workflow handle sitemap indexes with multiple sub-sitemaps?
It loops through each sub-sitemap URL found in the index, fetches their content, and extracts URLs from each before aggregation.
What if the sitemap.xml contains only a direct list of URLs?
The workflow detects this and processes the URL list directly without further sub-sitemap expansion.
How are duplicate URLs handled?
All URLs are aggregated preserving their original order, and duplicates are removed before final output.
What input is required to start the extraction?
You only need to provide the root domain URL including protocol and trailing slash (e.g., https://example.com/).
Was This Page Helpful?

More Workflows for Inspiration

🛟
Bidirectional synchronization between Zendesk and Google Sheets
Streamline ticket and spreadsheet data syncing to eliminate manual reconciliation and errors.
Learn more >
⚙️
Daily Lead Context Enrichment
Automate capturing qualified HubSpot leads, enrich company profiles, and boost sales efficiency fast.
Learn more >
⚙️
Daily Meeting Digest for Slack
Automatically summarize daily meetings and deliver clear Slack digests to boost team alignment instantly.
Learn more >