# Sitemap Finder and Sitemap URL Extractor (Free) > Source: https://scrape.do/tools/sitemap-finder/ Free sitemap finder. List where a site's sitemap usually lives, starting with robots.txt, then extract every URL and lastmod from a sitemap to CSV, TXT or JSON. Type a domain to list where its sitemap usually lives: robots.txt first, then the default paths of WordPress, Shopify, Wix, Squarespace and other platforms, with a command that checks them for real. Paste a robots.txt or a sitemap to extract every URL, lastmod, child sitemap and image, news or video entry, then filter the list and export it as CSV. It all runs in your browser. ## How to use the sitemap finder 1. **Type a domain** in **Find a sitemap**, like `example.com`, and click **Find sitemaps**. You get the places sitemaps usually live on that site, robots.txt first, each one a link you can open. 2. **Open robots.txt** and look for `Sitemap:` lines. If you'd rather not leave the page, click **Try reading robots.txt from this browser**. It works on sites that allow cross-origin reads, and when a site blocks it, the tool says so instead of guessing. 3. **Run the command** under the list in your terminal. The cURL, Python and Scrape.do versions all fetch robots.txt and print its sitemaps. 4. **Paste what you found** in **Extract URLs**: a robots.txt, a sitemap index, a sitemap with image, news or video tags, an RSS or Atom feed, or a plain list of URLs. You can also drop a `.xml` or `.xml.gz` file. 5. **Filter and export.** Narrow the list by text or a regular expression, by folder, by lastmod date or to URLs with images, video or news tags. Then copy the URLs or download them as CSV, TXT or JSON. The extractor handles a full 50,000 URL sitemap and draws the first 500 rows, so the page stays fast. Exports always carry every match. When you need the sitemap and every page in it from code, the Scrape.do [Web Scraping API](/products/web-scraping-api/) fetches both through rotating proxies, so a site that blocks scripts still answers. The section on crawling at scale below has the code. ## How to find a website's sitemap There is no single address every site uses. Check these places in this order. ### 1. Read the Sitemap lines in robots.txt robots.txt is the one file where a site says where its sitemaps are. A `Sitemap:` line can sit anywhere in the file, belongs to no user-agent group and can repeat, so big sites list many: ```bash curl -s https://techcrunch.com/robots.txt | grep -i '^sitemap:' ``` ```plaintext Sitemap: https://techcrunch.com/sitemap.xml Sitemap: https://techcrunch.com/news-sitemap.xml ``` The value must be a full URL, and it doesn't have to be on the same path or even the same host as the site's pages. The New York Times lists dozens of sitemaps for news, video, cooking and its other sections, all in one robots.txt. Our [robots.txt guide](/blog/robots-txt/) explains the rest of the file. ### 2. Try the default path for the platform When robots.txt names no sitemap, the platform behind the site usually puts it at a fixed path. These are the defaults we found on live sites: | Platform | Sitemap URL | What you get | |---|---|---| | WordPress (built in) | `/wp-sitemap.xml` | An index of post, page, taxonomy and user sitemaps | | WordPress with Yoast SEO or Rank Math | `/sitemap_index.xml` | An index of `post-sitemap.xml`, `page-sitemap.xml` and more | | Shopify | `/sitemap.xml` | An index of product, page, collection and blog sitemaps | | Squarespace | `/sitemap.xml` | One sitemap with image tags for each page | | Wix | `/sitemap.xml` | The site's sitemap | | Webflow | `/sitemap.xml` | The site's sitemap or an index | | Ghost | `/sitemap.xml` | An index of page, post, author and tag sitemaps | | Blogger | `/sitemap.xml` | The blog's posts | | HubSpot | `/sitemap.xml` | The site's pages, with video tags where pages have them | | Astro | `/sitemap-index.xml` | An index of `sitemap-0.xml` and up | `/sitemap.xml` is the first guess on any site. A path that answers with an HTML page, a redirect to the home page or a 404 has no sitemap behind it. Some sites send a bot check or their 404 page with a 200 status, so look at what came back, not only the status code. ### 3. Look for news, image and video sitemaps Publishers keep separate sitemaps for Google News and video, and robots.txt usually lists them next to the main one. Yoast's news add-on puts the news sitemap at `/news-sitemap.xml`. Image tags often live inside the regular sitemap: Shopify adds an `` block to each product's entry, and Squarespace to each page that has images. ### 4. Check Search Console for your own site If you own the site, the Sitemaps report in Google Search Console shows every sitemap Google knows about, when it last read each one and how many URLs it found. ## How to find a sitemap with Python This script reads robots.txt first and falls back to the common paths. It accepts an answer as a sitemap only when the body is XML with a `` or ``, or gzip data, so an HTML 404 page with a 200 status doesn't count: ```python import re import requests HEADERS = {"User-Agent": "Mozilla/5.0 (compatible; sitemap-finder/1.0)"} COMMON_PATHS = [ "/sitemap.xml", "/sitemap_index.xml", "/wp-sitemap.xml", "/sitemap-index.xml", "/sitemap.xml.gz", ] def looks_like_sitemap(response): head = response.content[:2000] return response.ok and ( head.startswith(b"\x1f\x8b") or b"", source, sitemaps) ``` ```plaintext https://techcrunch.com -> robots.txt ['https://techcrunch.com/sitemap.xml', 'https://techcrunch.com/news-sitemap.xml'] https://www.allbirds.com -> robots.txt ['https://www.allbirds.com/sitemap.xml'] https://astro.build -> robots.txt ['https://astro.build/sitemap-index.xml'] ``` Python's standard library can read the `Sitemap:` lines too. `RobotFileParser.site_maps()` returns them as a list, or `None` when there are none: ```python from urllib.robotparser import RobotFileParser robots = RobotFileParser("https://www.allbirds.com/robots.txt") robots.read() print(robots.site_maps()) ``` ```plaintext ['https://www.allbirds.com/sitemap.xml'] ``` ## How to find a sitemap with Node.js The `fetch` built into Node.js 18 and later does the same job. Send a user agent: in our tests a large news site answered Node's default one with a 403 page. Save this as a `.mjs` file so the top-level `await` works: ```javascript const site = "https://techcrunch.com"; const headers = { "User-Agent": "Mozilla/5.0 (compatible; sitemap-finder/1.0)" }; const response = await fetch(`${site}/robots.txt`, { headers }); if (!response.ok) throw new Error(`robots.txt returned ${response.status}`); const robots = await response.text(); const sitemaps = [...robots.matchAll(/^\s*sitemap:\s*(\S+)/gim)].map((m) => m[1]); console.log(sitemaps); const xml = await (await fetch(sitemaps[0], { headers })).text(); const locs = [...xml.matchAll(/\s*(.*?)\s*<\/loc>/g)].map((m) => m[1]); console.log(locs.length, "entries, first:", locs[0]); ``` ```plaintext [ 'https://techcrunch.com/sitemap.xml', 'https://techcrunch.com/news-sitemap.xml' ] 2065 entries, first: https://techcrunch.com/sitemap-page-1.xml ``` The first entry is another sitemap, not a page: TechCrunch's main sitemap is a sitemap index. ## What is a sitemap index? A sitemap index is a sitemap of sitemaps. Its root element is ``, and each `` entry points to a child sitemap, with an optional `` for when that child last changed. This is the start of Yoast SEO's own index: ```xml https://yoast.com/post-sitemap.xml 2026-11-25T14:14:05+00:00 https://yoast.com/page-sitemap.xml 2026-11-28T11:43:38+00:00 ``` The page URLs live one level down, in `` files where each `` holds a ``: ```xml https://scrape.do/about/ 2026-10-14T00:00:00.000Z monthly ``` Sites split their sitemaps by content type (posts, pages, products), by date or by count once a file nears the limit. To get every URL, read the index, open each child and repeat until you reach the `` files. Paste an index in the extractor and it lists every child sitemap as a link, ready to open and paste back. ## Sitemap limits: 50,000 URLs and 50 MB The [sitemaps.org protocol](https://www.sitemaps.org/protocol.html) and [Google's sitemap guide](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap) set the same rules: | Rule | Limit | |---|---| | URLs in one sitemap | 50,000 | | Size of one sitemap or index | 50 MB (52,428,800 bytes) uncompressed, even when gzipped | | Sitemaps in one index | 50,000 | | URLs | Full, absolute URLs on the same host as the sitemap | | Encoding | UTF-8, with `&` written as `&` | | News entries in one news sitemap | 1,000, for articles from the last two days | | Images per `` | 1,000 | Google ignores `` and ``, and uses `` when it is consistently accurate. For a scraper, `` is the useful field: it tells you which pages changed since your last run. A sitemap can only list URLs from its own host, unless the other host's robots.txt points to it. Sitemaps themselves can still move: Webflow's own `/sitemap.xml` redirects to a CDN host and lists its child sitemaps there, so let your code follow redirects. The extractor checks the limits for you. It warns when a file has more than 50,000 URLs or 50 MB, when a URL is not a full `http` or `https` address, when a `&` is not escaped (strict XML parsers reject the whole file for that) and when a news sitemap holds more than 1,000 entries. ## Image, news and video sitemaps Google defines extra tags that sit inside a `` entry. The extractor reads all three, plus the `hreflang` links of multilingual sites. **Image tags** list the images on a page. Squarespace adds one per page image: ```xml https://www.squarespace.com/press-coverage 2026-09-22 https://static1.squarespace.com/static/5134cbefe4b0c6fb04df8065/t/598b5b9dbebafb9c49b9fac0/1502305189166/final_asset-press-and-media-banner.jpg ``` **News tags** carry the publication, language, publication date and headline that Google News needs: ```xml https://techcrunch.com/2026/11/29/indias-astrobase-raises-75m-to-build-spacex-style-reusable-rockets/ TechCrunch en 2026-11-30T00:00:00+00:00 ``` **Video tags** hold the title, description, thumbnail and duration of each video, which makes a video sitemap a ready-made index of a site's videos. Filter the extractor by **With video** and export to CSV to get the URL, the video title and the page together. ## How to extract all URLs from a sitemap with Python This script walks a sitemap index down to every page URL, unpacks gzipped files and saves the URLs with their lastmod to CSV. It uses only `requests` and the standard library: ```python import csv import gzip import xml.etree.ElementTree as ET import requests HEADERS = {"User-Agent": "Mozilla/5.0 (compatible; sitemap-finder/1.0)"} NS = {"sm": "http://www.sitemaps.org/schemas/sitemap/0.9"} def fetch_xml(url): body = requests.get(url, headers=HEADERS, timeout=60).content if body[:2] == b"\x1f\x8b": # gzipped, whatever the file name says body = gzip.decompress(body) return ET.fromstring(body) def walk(url, seen=None): seen = set() if seen is None else seen if url in seen: return seen.add(url) root = fetch_xml(url) if root.tag.endswith("sitemapindex"): for loc in root.findall("sm:sitemap/sm:loc", NS): yield from walk(loc.text.strip(), seen) else: for node in root.findall("sm:url", NS): loc = node.findtext("sm:loc", "", NS).strip() lastmod = node.findtext("sm:lastmod", "", NS).strip() yield loc, lastmod rows = list(walk("https://ghost.org/sitemap.xml")) with open("ghost-urls.csv", "w", newline="", encoding="utf-8") as f: writer = csv.writer(f) writer.writerow(["url", "lastmod"]) writer.writerows(rows) print(len(rows), "URLs saved to ghost-urls.csv") print(rows[0]) ``` ```plaintext 1616 URLs saved to ghost-urls.csv ('https://ghost.org/about/', '2026-11-17T16:49:13+00:00') ``` The `seen` set stops a loop when an index lists itself or two indexes list each other. The gzip check reads the first two bytes instead of the file name, because a `.xml.gz` address doesn't always serve gzip: the New York Times sends plain XML at its `.xml.gz` sitemap URLs. To re-crawl only what changed, filter on lastmod. This keeps the URLs updated in the last 30 days: ```python import csv from datetime import datetime, timedelta, timezone def parse_lastmod(value): when = datetime.fromisoformat(value.replace("Z", "+00:00")) return when if when.tzinfo else when.replace(tzinfo=timezone.utc) cutoff = datetime.now(timezone.utc) - timedelta(days=30) with open("ghost-urls.csv", encoding="utf-8") as f: rows = list(csv.DictReader(f)) fresh = [row["url"] for row in rows if row["lastmod"] and parse_lastmod(row["lastmod"]) >= cutoff] print(len(fresh), "of", len(rows), "URLs changed in the last 30 days") ``` ```plaintext 86 of 1616 URLs changed in the last 30 days ``` In the extractor, the **Changed since** date does the same thing without code. From the command line, `gzip -dcf` unpacks a gzipped sitemap and passes a plain one through unchanged, so one command counts the URLs in either: ```bash curl -s https://www.nytimes.com/sitemaps/new/news.xml.gz | gzip -dcf | grep -c '' ``` ```plaintext 421 ``` ## How to crawl sitemap URLs at scale with Scrape.do A sitemap gives you the URL list. Fetching thousands of those pages from one IP is where sites start answering with 403s, CAPTCHAs and rate limits. The [Scrape.do API](/products/web-scraping-api/) fetches each URL through rotating proxies and returns the page, so your code only sends the URL. Read a robots.txt through the API: ```bash curl -s "https://api.scrape.do/?token=YOUR_TOKEN&url=https%3A%2F%2Fwww.nytimes.com%2Frobots.txt" | grep -i '^sitemap:' ``` ```plaintext Sitemap: https://www.nytimes.com/sitemaps/new/news.xml.gz Sitemap: https://www.nytimes.com/sitemaps/new/sitemap.xml.gz Sitemap: https://www.nytimes.com/sitemaps/new/collections.xml.gz ... ``` Then fetch the sitemap and its pages, five at a time. This reads Ghost's page sitemap and prints each page's status and title: ```python import re import xml.etree.ElementTree as ET from concurrent.futures import ThreadPoolExecutor import requests TOKEN = "YOUR_TOKEN" NS = {"sm": "http://www.sitemaps.org/schemas/sitemap/0.9"} def scrape(url): params = {"token": TOKEN, "url": url} return requests.get("https://api.scrape.do/", params=params, timeout=120) sitemap = scrape("https://ghost.org/sitemap-pages.xml") urls = [loc.text.strip() for loc in ET.fromstring(sitemap.content).findall("sm:url/sm:loc", NS)] print(len(urls), "URLs in the sitemap") def page_title(url): page = scrape(url) match = re.search(r"]*>(.*?)", page.text, re.S | re.I) return page.status_code, url, match.group(1).strip() if match else "" with ThreadPoolExecutor(max_workers=5) as pool: for status, url, title in pool.map(page_title, urls[:10]): print(status, url, "|", title[:50]) ``` ```plaintext 40 URLs in the sitemap 200 https://ghost.org/about/ | About Ghost - The Open Source Publishing Platform 200 https://ghost.org/contact/ | Contact Ghost Foundation 200 https://ghost.org/domain-error/ | Domain Error | Ghost - The Professional Publishing 200 https://ghost.org/6/ | Ghost 6.0 - Grow faster. 200 https://ghost.org/love/ | Ghost CMS user reviews & ratings ... ``` Set `max_workers` to your plan's concurrency: 5 on the free plan. For pages that build their content with JavaScript, add `"render": "true"` to the params. For long URL lists, the [Async API](/documentation/async-api/) takes up to 1,000 URLs per job and runs them in a separate pool next to your normal concurrency, and you collect the results when they're ready. It can also return each page as Markdown, ready for an LLM: ```python import time import xml.etree.ElementTree as ET import requests TOKEN = "YOUR_TOKEN" API = "https://q.scrape.do/api/v1/jobs" HEADERS = {"X-Token": TOKEN} NS = {"sm": "http://www.sitemaps.org/schemas/sitemap/0.9"} sitemap = requests.get( "https://astro.build/sitemap-0.xml", headers={"User-Agent": "Mozilla/5.0 (compatible; sitemap-finder/1.0)"}, timeout=60, ) urls = [loc.text.strip() for loc in ET.fromstring(sitemap.content).findall("sm:url/sm:loc", NS)] # one job takes up to 1,000 URLs; split longer lists into several jobs job = requests.post(API, headers=HEADERS, json={"Targets": urls[:20], "Output": "markdown"}).json() print("job", job["JobID"], "with", len(job["TaskIDs"]), "tasks") while True: details = requests.get(f"{API}/{job['JobID']}", headers=HEADERS).json() if details["Status"] in ("success", "error", "canceled"): break time.sleep(5) for task in details["Tasks"][:5]: result = requests.get(f"{API}/{job['JobID']}/{task['TaskID']}", headers=HEADERS).json() print(result["StatusCode"], result["URL"], len(result["Content"]), "characters of Markdown") ``` ```plaintext job eff56096-0b58-49e2-b0f9-d81636e2952c with 20 tasks 200 https://astro.build/ 18212 characters of Markdown 200 https://astro.build/agencies/ 8612 characters of Markdown 200 https://astro.build/agencies/bejamas/ 6801 characters of Markdown 200 https://astro.build/agencies/bits-and-letters/ 9793 characters of Markdown 200 https://astro.build/agencies/join/ 8506 characters of Markdown ``` Replace `YOUR_TOKEN` with your API token. Signing up gets you 1,000 free credits a month, no card needed. ## When a site has no sitemap A sitemap is optional, and a missing one doesn't mean the site is small. Try these in order: - **robots.txt,** for a sitemap at an unusual path. - **The feed,** at `/feed/` on WordPress or `/atom.xml` on Blogger. Feeds count as sitemaps, but they hold only the latest posts. The extractor reads RSS and Atom feeds too. - **llms.txt,** a newer file where some sites list the pages they want AI tools to read. Our [llms.txt guide](/blog/llms-txt/) covers how to read one. - **A link crawl.** Start at the home page and follow internal links, as in our [Python web crawler guide](/blog/web-crawler-python/). The sitemap, when there is one, makes a better starting list. ## Related reading - [robots.txt for Web Scraping](/blog/robots-txt/), every directive and how to parse it - [How to Build a Web Crawler in Python](/blog/web-crawler-python/), for sites without a sitemap - [llms.txt Explained](/blog/llms-txt/), the newest file at a site's root - [Async API documentation](/documentation/async-api/), for crawling long URL lists - [XML to JSON Converter](/tools/xml-to-json/), to turn a whole sitemap into JSON - [More free tools](/tools/) for scraping work, from HTML to Markdown to XPath ## FAQ ### How do I find the sitemap of a website? Open the site's robots.txt (for example `example.com/robots.txt`) and look for lines that start with `Sitemap:`. They are the site's own list of sitemaps. If there are none, try `/sitemap.xml`, then the platform paths: `/sitemap_index.xml` for WordPress with Yoast SEO or Rank Math, `/wp-sitemap.xml` for WordPress without a plugin, and `/sitemap-index.xml` for Astro. For your own site, the Sitemaps report in Google Search Console shows what Google found. ### Why doesn't the sitemap finder fetch the sitemap for me? Because it runs in your browser, and browsers don't let one website read another website's files unless that site allows it (the CORS rule). Most sites don't. Instead of guessing, the tool lists the likely locations as links, says plainly that it checked nothing, and gives you a cURL, Python or Scrape.do command that fetches robots.txt for real. The **Try reading robots.txt from this browser** button works on the sites that do allow it, such as GitHub Pages sites. ### How many URLs can a sitemap have? 50,000 URLs and 50 MB uncompressed per file, under the [sitemaps.org protocol](https://www.sitemaps.org/protocol.html) that Google follows. Gzip makes the download smaller but doesn't raise the limit. A bigger site splits its URLs over several sitemaps and lists them in a sitemap index, which can hold up to 50,000 sitemaps. The extractor warns you when a pasted file goes over either limit. ### Can I extract URLs from a .xml.gz sitemap? Yes. Drop the file on the text box or use **Open file**, and the tool unpacks it in your browser. It checks the file's first bytes, not its name: some sites serve plain XML at a `.xml.gz` address, and the tool reads either one. ### What if a website has no sitemap? A sitemap is optional, so many small sites have none. Check robots.txt first, since some sitemaps live at unusual paths. Then try the RSS feed (`/feed/` on WordPress), which lists the latest posts. If there's nothing, crawl the site by following its links, as in our [Python web crawler guide](/blog/web-crawler-python/). ### Is anything I paste uploaded? No. The finder and the extractor are JavaScript running in your tab. Nothing you type, paste or drop is sent anywhere. The only request the page makes is the robots.txt read, and only when you click **Try reading robots.txt from this browser**.